diff --git a/change_log.txt b/change_log.txt index 6459e381f..13837f30d 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,4 +1,8 @@ ===== 3.1.31-dev ===== (xx.xx.xx) + 11.11.2016 + - bugfix when Smarty is using a cached template object on Smarty::fetch() or Smarty::isCached() the inheritance data + must be removed https://github.com/smarty-php/smarty/issues/312 + 08.11.2016 - add bootstrap file to load and register Smarty_Autoloader. Change composer.json to make it known to composer diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index f4564e258..cad61e7d6 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -108,7 +108,7 @@ class Smarty extends Smarty_Internal_TemplateBase /** * smarty version */ - const SMARTY_VERSION = '3.1.31-dev/42'; + const SMARTY_VERSION = '3.1.31-dev/43'; /** * define variable scopes @@ -434,6 +434,7 @@ class Smarty extends Smarty_Internal_TemplateBase * @var boolean */ public $extends_recursion = true; + /** * force cache file creation * @@ -1119,9 +1120,11 @@ public function createTemplate($template, $cache_id = null, $compile_id = null, if ($this->caching && isset($this->_cache[ 'isCached' ][ $_templateId ])) { $tpl = $do_clone ? clone $this->_cache[ 'isCached' ][ $_templateId ] : $this->_cache[ 'isCached' ][ $_templateId ]; + $tpl->inheritance = null; $tpl->tpl_vars = $tpl->config_vars = array(); } else if (!$do_clone && isset($this->_cache[ 'tplObjects' ][ $_templateId ])) { $tpl = clone $this->_cache[ 'tplObjects' ][ $_templateId ]; + $tpl->inheritance = null; $tpl->tpl_vars = $tpl->config_vars = array(); } else { /* @var Smarty_Internal_Template $tpl */