diff options
| author | uwetews <uwe.tews@googlemail.com> | 2016-10-19 19:35:58 +0200 |
|---|---|---|
| committer | uwetews <uwe.tews@googlemail.com> | 2016-10-19 19:35:58 +0200 |
| commit | 80a024f44efdcc307dedbfdbb63243e718660fdb (patch) | |
| tree | b617444ff6f80dc95dc91788fa3d69d6dc72f244 | |
| parent | f3e0e01266f2e05ea539aeef36e845f5718fc2fc (diff) | |
| download | smarty-80a024f44efdcc307dedbfdbb63243e718660fdb.tar.gz smarty-80a024f44efdcc307dedbfdbb63243e718660fdb.tar.bz2 smarty-80a024f44efdcc307dedbfdbb63243e718660fdb.zip | |
- bugfix {make_nocache $var} did fail when variable value did contain '\' https://github.com/smarty-php/smarty/issues/305
| -rw-r--r-- | change_log.txt | 3 | ||||
| -rw-r--r-- | libs/Smarty.class.php | 2 | ||||
| -rw-r--r-- | libs/sysplugins/smarty_internal_runtime_make_nocache.php | 4 |
3 files changed, 6 insertions, 3 deletions
diff --git a/change_log.txt b/change_log.txt index 8a43524c..4385d61a 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,4 +1,7 @@ ===== 3.1.31-dev ===== (xx.xx.xx) + 19.10.2016 + - bugfix {make_nocache $var} did fail when variable value did contain '\' https://github.com/smarty-php/smarty/issues/305 + 12.10.2016 - bugfix {include} with template names including variable or constants could fail after bugfix from 28.09.2016 https://github.com/smarty-php/smarty/issues/302 diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index 68fcd04d..239f3c4b 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -114,7 +114,7 @@ class Smarty extends Smarty_Internal_TemplateBase /** * smarty version */ - const SMARTY_VERSION = '3.1.31-dev/34'; + const SMARTY_VERSION = '3.1.31-dev/35'; /** * define variable scopes diff --git a/libs/sysplugins/smarty_internal_runtime_make_nocache.php b/libs/sysplugins/smarty_internal_runtime_make_nocache.php index dd9e15f1..e72e93ce 100644 --- a/libs/sysplugins/smarty_internal_runtime_make_nocache.php +++ b/libs/sysplugins/smarty_internal_runtime_make_nocache.php @@ -29,8 +29,8 @@ class Smarty_Internal_Runtime_Make_Nocache throw new SmartyException("{make_nocache \${$var}} in template '{$tpl->source->name}': variable does contain object '{$match[1]}' not implementing method '__set_state'"); } echo "/*%%SmartyNocache:{$tpl->compiled->nocache_hash}%%*/<?php " . - addcslashes("\$_smarty_tpl->smarty->ext->_make_nocache->store(\$_smarty_tpl, '{$var}', " . $export, - '\\') . ");?>\n/*/%%SmartyNocache:{$tpl->compiled->nocache_hash}%%*/"; + addcslashes("\$_smarty_tpl->smarty->ext->_make_nocache->store(\$_smarty_tpl, '{$var}', ", + '\\') . $export . ");?>\n/*/%%SmartyNocache:{$tpl->compiled->nocache_hash}%%*/"; } } |
