From c4e6ad6c35a101ee102d9c098976778bb9d1ac70 Mon Sep 17 00:00:00 2001 From: uwetews Date: Mon, 14 Dec 2015 00:18:27 +0100 Subject: [PATCH] - bugfix multiple calls of {section} with same name droped E_NOTICE error https://github.com/smarty-php/smarty/issues/118 --- change_log.txt | 3 ++- libs/Smarty.class.php | 2 +- libs/sysplugins/smarty_internal_compile_section.php | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/change_log.txt b/change_log.txt index c223cc0c..142cf146 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,7 +1,8 @@  ===== 3.1.29-dev ===== (xx.xx.2015) 14.12.2015 - bugfix {$smarty.config.foo} broken in 3.1.28 https://github.com/smarty-php/smarty/issues/120 - + - bugfix multiple calls of {section} with same name droped E_NOTICE error https://github.com/smarty-php/smarty/issues/118 + ===== 3.1.28 ===== (13.12.2015) 13.12.2015 - bugfix {foreach} and {section} with uppercase characters in name attribute did not work (forum topic 25819) diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index 85efef1c..12f3bb64 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -118,7 +118,7 @@ class Smarty extends Smarty_Internal_TemplateBase /** * smarty version */ - const SMARTY_VERSION = '3.1.29-dev/2'; + const SMARTY_VERSION = '3.1.29-dev/3'; /** * define variable scopes diff --git a/libs/sysplugins/smarty_internal_compile_section.php b/libs/sysplugins/smarty_internal_compile_section.php index 079903c2..dccbc0ff 100644 --- a/libs/sysplugins/smarty_internal_compile_section.php +++ b/libs/sysplugins/smarty_internal_compile_section.php @@ -103,7 +103,7 @@ class Smarty_Internal_Compile_Section extends Smarty_Internal_Compile_Private_Fo // maybe nocache because of nocache variables $compiler->nocache = $compiler->nocache | $compiler->tag_nocache; - $initLocal = array('saved' => "isset(\$_smarty_tpl->tpl_vars['__smarty_section_{$attributes['name']}']) ? \$_smarty_tpl->tpl_vars['__section_{$attributes['name']}'] : false",); + $initLocal = array('saved' => "isset(\$_smarty_tpl->tpl_vars['__smarty_section_{$attributes['name']}']) ? \$_smarty_tpl->tpl_vars['__smarty_section_{$attributes['name']}'] : false",); $initNamedProperty = array(); $initFor = array(); $incFor = array();