1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-10 18:54:08 +02:00

[ticket/14577] Do not calculate size of array in for loop

For loops that modify the size of the looped arrays were obviously not
changed.

PHPBB3-14577
This commit is contained in:
Marc Alexander
2016-04-02 09:46:54 +02:00
parent 3f5a873e4c
commit 5b61ac06cb
5 changed files with 12 additions and 12 deletions

View File

@@ -932,7 +932,7 @@ class install_convert extends module
$val = array($val);
}
for ($j = 0; $j < sizeof($val); ++$j)
for ($j = 0, $size = sizeof($val); $j < $size; ++$j)
{
if (preg_match('/LEFT JOIN ([a-z0-9_]+) AS ([a-z0-9_]+)/i', $val[$j], $m))
{