aboutsummaryrefslogtreecommitdiffstats
path: root/include/smarty/libs/sysplugins/smarty_internal_compile_capture.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2016-01-21 15:10:02 +0100
committerplegall <plg@piwigo.org>2016-01-21 15:10:02 +0100
commitd33051cb7236a930c1baf879fee75e92c35a93ee (patch)
tree4f7c596268420cc670cbbf767d941fadb07a1b26 /include/smarty/libs/sysplugins/smarty_internal_compile_capture.php
parent491464355911334ecbf49b742545286e82961112 (diff)
update to Smarty 3.1.29
Diffstat (limited to 'include/smarty/libs/sysplugins/smarty_internal_compile_capture.php')
-rw-r--r--include/smarty/libs/sysplugins/smarty_internal_compile_capture.php9
1 files changed, 4 insertions, 5 deletions
diff --git a/include/smarty/libs/sysplugins/smarty_internal_compile_capture.php b/include/smarty/libs/sysplugins/smarty_internal_compile_capture.php
index 95c75a4b1..be45f3e94 100644
--- a/include/smarty/libs/sysplugins/smarty_internal_compile_capture.php
+++ b/include/smarty/libs/sysplugins/smarty_internal_compile_capture.php
@@ -69,13 +69,12 @@ class Smarty_Internal_Compile_Capture extends Smarty_Internal_CompileBase
*/
public static function compileSpecialVariable($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter)
{
- // make all lower case
- $parameter = array_map('strtolower', $parameter);
- $tag = trim($parameter[0], '"\'');
- if (!isset($parameter[1]) || false === $name = $compiler->getId($parameter[1])) {
+ $tag = strtolower(trim($parameter[ 0 ], '"\''));
+ $name = isset($parameter[ 1 ]) ? $compiler->getId($parameter[ 1 ]) : false;
+ if (!$name) {
$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)";
}
}