diff options
author | Marc Alexander <admin@m-a-styles.de> | 2016-04-02 09:46:54 +0200 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2016-04-02 09:46:54 +0200 |
commit | 5b61ac06cbb065d0e5d6c0c108ead96cea0c3333 (patch) | |
tree | 0eb30c021770286205be0489c3412a8613b8965d /phpBB/includes/acp | |
parent | 3f5a873e4cff0fd6f9ab2dd4fad1179009abed4b (diff) | |
download | forums-5b61ac06cbb065d0e5d6c0c108ead96cea0c3333.tar forums-5b61ac06cbb065d0e5d6c0c108ead96cea0c3333.tar.gz forums-5b61ac06cbb065d0e5d6c0c108ead96cea0c3333.tar.bz2 forums-5b61ac06cbb065d0e5d6c0c108ead96cea0c3333.tar.xz forums-5b61ac06cbb065d0e5d6c0c108ead96cea0c3333.zip |
[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
Diffstat (limited to 'phpBB/includes/acp')
-rw-r--r-- | phpBB/includes/acp/acp_attachments.php | 2 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_forums.php | 2 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_modules.php | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/phpBB/includes/acp/acp_attachments.php b/phpBB/includes/acp/acp_attachments.php index 8e8ace8337..816387967a 100644 --- a/phpBB/includes/acp/acp_attachments.php +++ b/phpBB/includes/acp/acp_attachments.php @@ -1426,7 +1426,7 @@ class acp_attachments $row['group_name'] = $user->lang['NOT_ASSIGNED']; $group_name[] = $row; - for ($i = 0; $i < sizeof($group_name); $i++) + for ($i = 0, $groups_size = sizeof($group_name); $i < $groups_size; $i++) { if ($default_group === false) { diff --git a/phpBB/includes/acp/acp_forums.php b/phpBB/includes/acp/acp_forums.php index 7e664c6263..98273f06d9 100644 --- a/phpBB/includes/acp/acp_forums.php +++ b/phpBB/includes/acp/acp_forums.php @@ -1411,7 +1411,7 @@ class acp_forums $diff = sizeof($moved_forums) * 2; $moved_ids = array(); - for ($i = 0; $i < sizeof($moved_forums); ++$i) + for ($i = 0, $size = sizeof($moved_forums); $i < $size; ++$i) { $moved_ids[] = $moved_forums[$i]['forum_id']; } diff --git a/phpBB/includes/acp/acp_modules.php b/phpBB/includes/acp/acp_modules.php index ea6b388328..55ea26b9d3 100644 --- a/phpBB/includes/acp/acp_modules.php +++ b/phpBB/includes/acp/acp_modules.php @@ -888,7 +888,7 @@ class acp_modules $diff = sizeof($moved_modules) * 2; $moved_ids = array(); - for ($i = 0; $i < sizeof($moved_modules); ++$i) + for ($i = 0, $size = sizeof($moved_modules); $i < $size; ++$i) { $moved_ids[] = $moved_modules[$i]['module_id']; } |