- bugfix using $smarty.capture.foo in expressions could fail https://github.com/smarty-php/smarty/pull/138

This commit is contained in:
uwetews
2015-12-19 19:18:31 +01:00
parent 818715351a
commit e32720ef4e
3 changed files with 5 additions and 2 deletions

View File

@@ -1,4 +1,7 @@
 ===== 3.1.29-dev ===== (xx.xx.2015)  ===== 3.1.29-dev ===== (xx.xx.2015)
19.12.2015
- bugfix using $smarty.capture.foo in expressions could fail https://github.com/smarty-php/smarty/pull/138
18.12.2015 18.12.2015
- bugfix regression when modifier parameter was follow by math https://github.com/smarty-php/smarty/issues/132 - bugfix regression when modifier parameter was follow by math https://github.com/smarty-php/smarty/issues/132

View File

@@ -118,7 +118,7 @@ class Smarty extends Smarty_Internal_TemplateBase
/** /**
* smarty version * smarty version
*/ */
const SMARTY_VERSION = '3.1.29-dev/11'; const SMARTY_VERSION = '3.1.29-dev/12';
/** /**
* define variable scopes * define variable scopes

View File

@@ -74,7 +74,7 @@ class Smarty_Internal_Compile_Capture extends Smarty_Internal_CompileBase
if (!$name) { if (!$name) {
$compiler->trigger_template_error("missing or illegal \$smarty.{$tag} name attribute", null, true); $compiler->trigger_template_error("missing or illegal \$smarty.{$tag} name attribute", null, true);
} }
return "isset(\$_smarty_tpl->_cache['__smarty_capture']['{$name}']) ? \$_smarty_tpl->_cache['__smarty_capture']['{$name}'] : null"; return "(isset(\$_smarty_tpl->_cache['__smarty_capture']['{$name}']) ? \$_smarty_tpl->_cache['__smarty_capture']['{$name}'] : null)";
} }
} }