From 05c069d8895d3602290065e46ca90a5707a786b8 Mon Sep 17 00:00:00 2001 From: uwetews Date: Fri, 18 Dec 2015 00:34:58 +0100 Subject: [PATCH] - bugfix using {block append/prepend} on same block in multiple levels of inheritance templates could fail (forum topic 25827) --- libs/sysplugins/smarty_internal_runtime_inheritance.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libs/sysplugins/smarty_internal_runtime_inheritance.php b/libs/sysplugins/smarty_internal_runtime_inheritance.php index 3362182c..08a56060 100644 --- a/libs/sysplugins/smarty_internal_runtime_inheritance.php +++ b/libs/sysplugins/smarty_internal_runtime_inheritance.php @@ -215,7 +215,11 @@ class Smarty_Internal_Runtime_Inheritance $this->processBlock($tpl, 3, $name, null, $appendStack); } // call block of current stack level - $block[ 0 ]($tpl, $callStack); + if (isset($block[6])) { + $block[6]($tpl, $callStack); + } else { + $block[0]($tpl, $callStack); + } // {block prepend} ? if (isset($block[ 'prepend' ])) { $prependStack = $callStack;