From b5daa91650aa482bbe5fce75761804259ee4eb94 Mon Sep 17 00:00:00 2001 From: Jakub Senko Date: Mon, 18 Jun 2018 11:20:18 +0200 Subject: [ticket/15659] Fix retrieve_block_vars() PHPBB3-15659 --- phpBB/phpbb/template/context.php | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'phpBB/phpbb') 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]; -- cgit v1.2.1