Skip to content

Commit aaa9303

Browse files
committed
DFRawFunctions.body.php: tagentry: fix str to int comparison
Default str to int comparison behavior was changed in php8+ https://wiki.php.net/rfc/string_to_number_comparison with is caused undefined behavior in code. This commit fixes it by explicitly casting str to int.
1 parent 32c30df commit aaa9303

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

DFRawFunctions.body.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ public static function tagentry (&$parser, $data = '', $type = '', $num = 0, $of
160160
return $notfound;
161161
foreach ($tags as $tag)
162162
{
163-
if ($offset >= count($tag))
163+
if ((int)$offset >= count($tag))
164164
continue;
165165
$match = true;
166166
for ($i = 0; $i < $numcaps; $i++)

0 commit comments

Comments
 (0)