diff options
author | redmatrix <git@macgirvin.com> | 2016-04-23 16:57:32 -0700 |
---|---|---|
committer | redmatrix <git@macgirvin.com> | 2016-04-23 16:57:32 -0700 |
commit | ce45a1cf945617f3895fb3e40b13e6f705fbc000 (patch) | |
tree | 8d407ab11e8c4fdc4560cf67e0fd242f7f1544a0 /library/Smarty/libs/sysplugins/smarty_internal_compile_capture.php | |
parent | 79c63e3cf44438a7f993b2ea1813b9234ea4d3f3 (diff) | |
parent | 9d698c08876169228b09e144f80c5311fcb0fa49 (diff) | |
download | volse-hubzilla-ce45a1cf945617f3895fb3e40b13e6f705fbc000.tar.gz volse-hubzilla-ce45a1cf945617f3895fb3e40b13e6f705fbc000.tar.bz2 volse-hubzilla-ce45a1cf945617f3895fb3e40b13e6f705fbc000.zip |
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge
Diffstat (limited to 'library/Smarty/libs/sysplugins/smarty_internal_compile_capture.php')
-rw-r--r-- | library/Smarty/libs/sysplugins/smarty_internal_compile_capture.php | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_compile_capture.php b/library/Smarty/libs/sysplugins/smarty_internal_compile_capture.php index 95c75a4b1..be45f3e94 100644 --- a/library/Smarty/libs/sysplugins/smarty_internal_compile_capture.php +++ b/library/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)"; } } |