mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 18:34:27 +02:00
$length is now propagated to sub-values in debug_print_var
This commit is contained in:
2
NEWS
2
NEWS
@@ -1,3 +1,5 @@
|
|||||||
|
- $length is now propagated to sub-values in debug_print_var (messju)
|
||||||
|
|
||||||
Version 2.5.0-RC2 (March 26, 2003)
|
Version 2.5.0-RC2 (March 26, 2003)
|
||||||
----------------------------------
|
----------------------------------
|
||||||
|
|
||||||
|
@@ -13,7 +13,7 @@ function smarty_modifier_debug_print_var($var, $depth = 0, $length = 40)
|
|||||||
if (is_array($var)) {
|
if (is_array($var)) {
|
||||||
$results = "<b>Array (".count($var).")</b>";
|
$results = "<b>Array (".count($var).")</b>";
|
||||||
foreach ($var as $curr_key => $curr_val) {
|
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";
|
$results .= '<br>\r'.str_repeat(' ', $depth*2)."<b>$curr_key</b> => $return";
|
||||||
}
|
}
|
||||||
return $results;
|
return $results;
|
||||||
@@ -21,7 +21,7 @@ function smarty_modifier_debug_print_var($var, $depth = 0, $length = 40)
|
|||||||
$object_vars = get_object_vars($var);
|
$object_vars = get_object_vars($var);
|
||||||
$results = "<b>".get_class($var)." Object (".count($object_vars).")</b>";
|
$results = "<b>".get_class($var)." Object (".count($object_vars).")</b>";
|
||||||
foreach ($object_vars as $curr_key => $curr_val) {
|
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";
|
$results .= '<br>\r'.str_repeat(' ', $depth*2)."<b>$curr_key</b> => $return";
|
||||||
}
|
}
|
||||||
return $results;
|
return $results;
|
||||||
|
Reference in New Issue
Block a user