mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 10:24:26 +02:00
fix debug console error
This commit is contained in:
@@ -684,22 +684,22 @@ function smarty_func_counter() {
|
|||||||
Purpose: assign debug info to the template
|
Purpose: assign debug info to the template
|
||||||
\*======================================================================*/
|
\*======================================================================*/
|
||||||
function smarty_func_assign_debug_info($args, &$smarty_obj) {
|
function smarty_func_assign_debug_info($args, &$smarty_obj) {
|
||||||
$assigned_vars = $smarty_obj->_tpl_vars;
|
$assigned_vars = $smarty_obj->_tpl_vars;
|
||||||
ksort($assigned_vars);
|
ksort($assigned_vars);
|
||||||
if (is_array($smarty_obj->_config[0])) {
|
if(is_array($smarty_obj->_config[0])) {
|
||||||
$config_vars = $smarty_obj->_config[0];
|
$config_vars = $smarty_obj->_config[0];
|
||||||
ksort($config_vars);
|
ksort($config_vars);
|
||||||
$smarty_obj->assign("_debug_config_keys",array_keys($config_vars));
|
$smarty_obj->assign("_debug_config_keys",array_keys($config_vars));
|
||||||
$smarty_obj->assign("_debug_config_vals",array_values($config_vars));
|
$smarty_obj->assign("_debug_config_vals",array_values($config_vars));
|
||||||
}
|
}
|
||||||
|
|
||||||
$included_templates = $smarty_obj->_included_tpls;
|
$included_templates = $smarty_obj->_smarty_debug_info;
|
||||||
|
|
||||||
$smarty_obj->assign("_debug_keys",array_keys($assigned_vars));
|
$smarty_obj->assign("_debug_keys",array_keys($assigned_vars));
|
||||||
$smarty_obj->assign("_debug_vals",array_values($assigned_vars));
|
$smarty_obj->assign("_debug_vals",array_values($assigned_vars));
|
||||||
|
|
||||||
$smarty_obj->assign("_debug_tpls",$included_templates);
|
$smarty_obj->assign("_debug_tpls",$included_templates);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*======================================================================*\
|
/*======================================================================*\
|
||||||
|
Reference in New Issue
Block a user