mirror of
https://github.com/smarty-php/smarty.git
synced 2026-04-19 07:58:54 +02:00
- bugfix on {debug}
This commit is contained in:
@@ -73,12 +73,21 @@ class Smarty_Internal_Debug extends Smarty_Internal_Data {
|
||||
/**
|
||||
* Opens a window for the Smarty Debugging Consol and display the data
|
||||
*/
|
||||
public static function display_debug($smarty)
|
||||
public static function display_debug($obj)
|
||||
{
|
||||
// prepare information of assigned variables
|
||||
$_assigned_vars = $smarty->tpl_vars;
|
||||
$ptr = $obj;
|
||||
while (isset($ptr->parent)) {
|
||||
$ptr = $ptr->parent;
|
||||
}
|
||||
if ($obj instanceof Smarty) {
|
||||
$smarty = $obj;
|
||||
} else {
|
||||
$smarty = $obj->smarty;
|
||||
}
|
||||
$_assigned_vars = $ptr->tpl_vars;
|
||||
ksort($_assigned_vars);
|
||||
$_config_vars = $smarty->config_vars;
|
||||
$_config_vars = $ptr->config_vars;
|
||||
ksort($_config_vars);
|
||||
$ldelim = $smarty->left_delimiter;
|
||||
$rdelim = $smarty->right_delimiter;
|
||||
|
||||
Reference in New Issue
Block a user