mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 10:54:27 +02:00
- bugfix when Smarty does use an internally cached template object on Smarty::fetch() calls
the template and config variables must be cleared https://github.com/smarty-php/smarty/issues/297
This commit is contained in:
@@ -1,4 +1,8 @@
|
||||
===== 3.1.31-dev ===== (xx.xx.xx)
|
||||
27.09.2016
|
||||
- bugfix when Smarty does use an internally cached template object on Smarty::fetch() calls
|
||||
the template and config variables must be cleared https://github.com/smarty-php/smarty/issues/297
|
||||
|
||||
20.09.2016
|
||||
- bugfix some $smarty special template variables are no longer accessed as real variable.
|
||||
using them on calls like {if isset($smarty.foo)} or {if empty($smarty.foo)} will fail
|
||||
|
@@ -114,7 +114,7 @@ class Smarty extends Smarty_Internal_TemplateBase
|
||||
/**
|
||||
* smarty version
|
||||
*/
|
||||
const SMARTY_VERSION = '3.1.31-dev/29';
|
||||
const SMARTY_VERSION = '3.1.31-dev/30';
|
||||
|
||||
/**
|
||||
* define variable scopes
|
||||
@@ -1120,6 +1120,7 @@ class Smarty extends Smarty_Internal_TemplateBase
|
||||
$tpl->tpl_vars = $tpl->config_vars = array();
|
||||
} else if (!$do_clone && isset($this->_cache[ 'tplObjects' ][ $_templateId ])) {
|
||||
$tpl = clone $this->_cache[ 'tplObjects' ][ $_templateId ];
|
||||
$tpl->tpl_vars = $tpl->config_vars = array();
|
||||
} else {
|
||||
/* @var Smarty_Internal_Template $tpl */
|
||||
$tpl = new $this->template_class($template, $this, null, $cache_id, $compile_id, null, null);
|
||||
|
Reference in New Issue
Block a user