diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index aaf66512..2ab41c82 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -111,7 +111,7 @@ class Smarty extends Smarty_Internal_TemplateBase /** * smarty version */ - const SMARTY_VERSION = '3.1.22-dev/11'; + const SMARTY_VERSION = '3.1.22-dev/12'; /** * define variable scopes diff --git a/libs/sysplugins/smarty_internal_parsetree_tag.php b/libs/sysplugins/smarty_internal_parsetree_tag.php index eb14db1c..878c7668 100644 --- a/libs/sysplugins/smarty_internal_parsetree_tag.php +++ b/libs/sysplugins/smarty_internal_parsetree_tag.php @@ -56,7 +56,7 @@ class Smarty_Internal_ParseTree_Tag extends Smarty_Internal_ParseTree public function assign_to_var() { $var = sprintf('$_tmp%d', ++ Smarty_Internal_Templateparser::$prefix_number); - $this->parser->compiler->prefix_code[] = sprintf("", preg_replace(array('/^\s*<\?php\s+/', '/\s*\?>\s*$/'), '', $this->data), $var); + $this->parser->compiler->prefix_code[] = sprintf("\n%s\n", $this->data, $var); return $var; }