From 5b61ac06cbb065d0e5d6c0c108ead96cea0c3333 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sat, 2 Apr 2016 09:46:54 +0200 Subject: [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 --- phpBB/install/install_convert.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/install') diff --git a/phpBB/install/install_convert.php b/phpBB/install/install_convert.php index a0f8a928de..10b05eb559 100644 --- a/phpBB/install/install_convert.php +++ b/phpBB/install/install_convert.php @@ -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)) { -- cgit v1.2.1