aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/template
diff options
context:
space:
mode:
authorTristan Darricau <tristan.darricau@gmail.com>2018-07-08 18:43:16 +0200
committerTristan Darricau <tristan.darricau@gmail.com>2018-07-08 18:43:16 +0200
commit7f76d911287cdb5010bd3ac1f17f5486bc3f30ee (patch)
treeb4a6b39e84a3e4d300029b281ea3b5c05b54a1f9 /phpBB/phpbb/template
parent71905e50e8663a960328a272c79f083d505076b4 (diff)
parentb5daa91650aa482bbe5fce75761804259ee4eb94 (diff)
downloadforums-7f76d911287cdb5010bd3ac1f17f5486bc3f30ee.tar
forums-7f76d911287cdb5010bd3ac1f17f5486bc3f30ee.tar.gz
forums-7f76d911287cdb5010bd3ac1f17f5486bc3f30ee.tar.bz2
forums-7f76d911287cdb5010bd3ac1f17f5486bc3f30ee.tar.xz
forums-7f76d911287cdb5010bd3ac1f17f5486bc3f30ee.zip
Merge pull request #5249 from senky/ticket/15659
[ticket/15659] Fix retrieve_block_vars() * github.com:/phpbb/phpbb: [ticket/15659] Fix retrieve_block_vars()
Diffstat (limited to 'phpBB/phpbb/template')
-rw-r--r--phpBB/phpbb/template/context.php10
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];