diff --git a/change_log.txt b/change_log.txt index e3f53ff6..aeb17e4d 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,4 +1,8 @@ ===== 3.1.34-dev-6 ===== +30.10.2018 + - bugfix a nested subblock in an inheritance child template was not replace by + outer level block with same name in same child template https://github.com/smarty-php/smarty/issues/500 + 29.10.2018 - bugfix Smarty::$php_handling == PHP_PASSTHRU (default) did eat the "\n" (newline) character if it did directly followed a PHP tag like "?>" or other https://github.com/smarty-php/smarty/issues/501 diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index f0757284..44b77a85 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -112,7 +112,7 @@ class Smarty extends Smarty_Internal_TemplateBase /** * smarty version */ - const SMARTY_VERSION = '3.1.34-dev-6'; + const SMARTY_VERSION = '3.1.34-dev-7'; /** * define variable scopes */ diff --git a/libs/sysplugins/smarty_internal_runtime_inheritance.php b/libs/sysplugins/smarty_internal_runtime_inheritance.php index 6392d4cb..8f7f02d5 100644 --- a/libs/sysplugins/smarty_internal_runtime_inheritance.php +++ b/libs/sysplugins/smarty_internal_runtime_inheritance.php @@ -150,7 +150,7 @@ class Smarty_Internal_Runtime_Inheritance return; } // make sure we got child block of child template of current block - while ($block->child && $block->tplIndex <= $block->child->tplIndex) { + while ($block->child && $block->child->child && $block->tplIndex <= $block->child->tplIndex) { $block->child = $block->child->child; } $this->process($tpl, $block);