diff options
author | Jakub Senko <jakubsenko@gmail.com> | 2018-06-18 11:20:18 +0200 |
---|---|---|
committer | Jakub Senko <jakubsenko@gmail.com> | 2018-07-07 15:46:24 +0200 |
commit | b5daa91650aa482bbe5fce75761804259ee4eb94 (patch) | |
tree | 81d1651b89bae224895ca3a4d3647901f704e8d5 /phpBB/phpbb/template | |
parent | 02cbb864a5b6df62e978a69c368c8ec5ca35d8a3 (diff) | |
download | forums-b5daa91650aa482bbe5fce75761804259ee4eb94.tar forums-b5daa91650aa482bbe5fce75761804259ee4eb94.tar.gz forums-b5daa91650aa482bbe5fce75761804259ee4eb94.tar.bz2 forums-b5daa91650aa482bbe5fce75761804259ee4eb94.tar.xz forums-b5daa91650aa482bbe5fce75761804259ee4eb94.zip |
[ticket/15659] Fix retrieve_block_vars()
PHPBB3-15659
Diffstat (limited to 'phpBB/phpbb/template')
-rw-r--r-- | phpBB/phpbb/template/context.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/phpBB/phpbb/template/context.php b/phpBB/phpbb/template/context.php index de583d3224..2ba6d185ad 100644 --- a/phpBB/phpbb/template/context.php +++ b/phpBB/phpbb/template/context.php @@ -274,6 +274,11 @@ class context { $name = substr($blocks[$i], 0, $pos); + if (empty($block[$name])) + { + return array(); + } + if (strpos($blocks[$i], '[]') === $pos) { $index = count($block[$name]) - 1; @@ -286,6 +291,11 @@ class context else { $name = $blocks[$i]; + if (empty($block[$name])) + { + return array(); + } + $index = count($block[$name]) - 1; } $block = $block[$name]; |