mirror of
https://github.com/smarty-php/smarty.git
synced 2025-11-03 05:41:37 +01:00
$length is now propagated to sub-values in debug_print_var
This commit is contained in:
@@ -13,7 +13,7 @@ function smarty_modifier_debug_print_var($var, $depth = 0, $length = 40)
|
||||
if (is_array($var)) {
|
||||
$results = "<b>Array (".count($var).")</b>";
|
||||
foreach ($var as $curr_key => $curr_val) {
|
||||
$return = smarty_modifier_debug_print_var($curr_val, $depth+1);
|
||||
$return = smarty_modifier_debug_print_var($curr_val, $depth+1, $length);
|
||||
$results .= '<br>\r'.str_repeat(' ', $depth*2)."<b>$curr_key</b> => $return";
|
||||
}
|
||||
return $results;
|
||||
@@ -21,7 +21,7 @@ function smarty_modifier_debug_print_var($var, $depth = 0, $length = 40)
|
||||
$object_vars = get_object_vars($var);
|
||||
$results = "<b>".get_class($var)." Object (".count($object_vars).")</b>";
|
||||
foreach ($object_vars as $curr_key => $curr_val) {
|
||||
$return = smarty_modifier_debug_print_var($curr_val, $depth+1);
|
||||
$return = smarty_modifier_debug_print_var($curr_val, $depth+1, $length);
|
||||
$results .= '<br>\r'.str_repeat(' ', $depth*2)."<b>$curr_key</b> => $return";
|
||||
}
|
||||
return $results;
|
||||
|
||||
Reference in New Issue
Block a user