diff options
author | Tristan Darricau <github@nicofuma.fr> | 2016-12-30 10:04:13 +0100 |
---|---|---|
committer | Tristan Darricau <github@nicofuma.fr> | 2016-12-30 10:04:13 +0100 |
commit | 3489780faaa6da87e41f855cecff98c00538542f (patch) | |
tree | c162abd58ad972c92d2ccb1164901d8726b9e3d2 /phpBB/phpbb | |
parent | 3ccaac488b77c2eb89a9db9ec025bfd2d14fa648 (diff) | |
parent | d9991bdaf1aa9685437c4f4c298fa54f0c0f33f0 (diff) | |
download | forums-3489780faaa6da87e41f855cecff98c00538542f.tar forums-3489780faaa6da87e41f855cecff98c00538542f.tar.gz forums-3489780faaa6da87e41f855cecff98c00538542f.tar.bz2 forums-3489780faaa6da87e41f855cecff98c00538542f.tar.xz forums-3489780faaa6da87e41f855cecff98c00538542f.zip |
Merge pull request #4597 from javiexin/ticket/14943
[ticket/14943] Fix template loop access by index
Diffstat (limited to 'phpBB/phpbb')
-rw-r--r-- | phpBB/phpbb/template/context.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/phpBB/phpbb/template/context.php b/phpBB/phpbb/template/context.php index 4ee48205c8..8bf6c10e2d 100644 --- a/phpBB/phpbb/template/context.php +++ b/phpBB/phpbb/template/context.php @@ -365,15 +365,15 @@ class context if ($mode == 'insert') { // Make sure we are not exceeding the last iteration - if ($key >= sizeof($this->tpldata[$blockname])) + if ($key >= sizeof($block)) { - $key = sizeof($this->tpldata[$blockname]); - unset($this->tpldata[$blockname][($key - 1)]['S_LAST_ROW']); + $key = sizeof($block); + unset($block[($key - 1)]['S_LAST_ROW']); $vararray['S_LAST_ROW'] = true; } else if ($key === 0) { - unset($this->tpldata[$blockname][0]['S_FIRST_ROW']); + unset($block[0]['S_FIRST_ROW']); $vararray['S_FIRST_ROW'] = true; } |