From cbea88b3a7243261d3a770552ebbc8e342183414 Mon Sep 17 00:00:00 2001 From: uwetews Date: Wed, 13 Jul 2016 01:42:54 +0200 Subject: [PATCH] - bugfix template function data should be merged when loading subtemplate https://github.com/smarty-php/smarty/issues/240 --- change_log.txt | 3 ++- libs/Smarty.class.php | 2 +- libs/sysplugins/smarty_internal_template.php | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/change_log.txt b/change_log.txt index b1480b6fe..a9cb3aa74 100644 --- a/change_log.txt +++ b/change_log.txt @@ -3,7 +3,8 @@ - bugfix PHP 7 compatibility on registered compiler plugins https://github.com/smarty-php/smarty/issues/241 - update testInstall() https://github.com/smarty-php/smarty/issues/248https://github.com/smarty-php/smarty/issues/248 - bugfix enable debugging could fail when template objects did already exists https://github.com/smarty-php/smarty/issues/237 - + - bugfix template function data should be merged when loading subtemplate https://github.com/smarty-php/smarty/issues/240 + 12.07.2016 - bugfix {foreach} item variable must be created also on empty from array https://github.com/smarty-php/smarty/issues/238 and https://github.com/smarty-php/smarty/issues/239 - bugfix enableSecurity() must init cache flags https://github.com/smarty-php/smarty/issues/247 diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index 904ecd7dd..41a6b2815 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -121,7 +121,7 @@ class Smarty extends Smarty_Internal_TemplateBase /** * smarty version */ - const SMARTY_VERSION = '3.1.30-dev/77'; + const SMARTY_VERSION = '3.1.30-dev/78'; /** * define variable scopes diff --git a/libs/sysplugins/smarty_internal_template.php b/libs/sysplugins/smarty_internal_template.php index 4b7f96c02..c4cfc75c5 100644 --- a/libs/sysplugins/smarty_internal_template.php +++ b/libs/sysplugins/smarty_internal_template.php @@ -482,7 +482,7 @@ public function _decodeProperties(Smarty_Internal_Template $tpl, $properties, $c // $tpl->compiled->nocache_hash = $properties['nocache_hash']; $resource->file_dependency = $properties[ 'file_dependency' ]; if (isset($properties[ 'tpl_function' ])) { - $tpl->tpl_function = $properties[ 'tpl_function' ]; + $tpl->tpl_function = array_merge($tpl->tpl_function, $properties[ 'tpl_function' ]); } } return $is_valid && !function_exists($properties[ 'unifunc' ]);