- 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
This commit is contained in:
uwetews
2016-11-11 20:13:40 +01:00
parent e867ae125e
commit d120c1fad2
2 changed files with 8 additions and 1 deletions

View File

@@ -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

View File

@@ -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 @@ class Smarty extends Smarty_Internal_TemplateBase
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 */