diff --git a/libs/sysplugins/smarty_internal_compile_capture.php b/libs/sysplugins/smarty_internal_compile_capture.php index d77f59607..be45f3e94 100644 --- a/libs/sysplugins/smarty_internal_compile_capture.php +++ b/libs/sysplugins/smarty_internal_compile_capture.php @@ -74,7 +74,7 @@ public static function compileSpecialVariable($args, Smarty_Internal_TemplateCom 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)"; } }