mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 02:44:27 +02:00
add isset($_smarty_tpl) to avoid errors when unit test runs in separate process
This commit is contained in:
@@ -37,7 +37,10 @@ class Smarty_Internal_Extension_CodeFrame
|
||||
if ($_template->smarty->direct_access_security) {
|
||||
$output .= "if(!defined('SMARTY_DIR')) exit('no direct access allowed');\n";
|
||||
}
|
||||
$output .= "\$_valid = \$_smarty_tpl->decodeProperties(" . var_export($_template->properties, true) . ',' . ($cache ? 'true' : 'false') . ");\n/*/%%SmartyHeaderCode%%*/\n";
|
||||
$output .= "if (isset(\$_smarty_tpl)) {\n";
|
||||
$output .= "\$_valid = \$_smarty_tpl->decodeProperties(" . var_export($_template->properties, true) . ',' . ($cache ? 'true' : 'false') . ");\n";
|
||||
$output .= "}\n";
|
||||
$output .= "/*/%%SmartyHeaderCode%%*/\n";
|
||||
$output .= "if (\$_valid && !is_callable('{$_template->properties['unifunc']}')) {function {$_template->properties['unifunc']} (\$_smarty_tpl) {\n";
|
||||
// include code for plugins
|
||||
if (!$cache) {
|
||||
|
Reference in New Issue
Block a user