mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 18:34:27 +02:00
remove warning in debug_print_var on php-resources
This commit is contained in:
1
NEWS
1
NEWS
@@ -1,3 +1,4 @@
|
||||
- remove warning in debug_print_var on php-resources (messju)
|
||||
- move function.assign.php to compiler.assign.php (messju)
|
||||
- add property $tpl_error_reporting (messju)
|
||||
- remove property $undefined. "null" is used literally instead (messju)
|
||||
|
@@ -28,7 +28,6 @@ function smarty_modifier_debug_print_var($var, $depth = 0, $length = 40)
|
||||
$return = smarty_modifier_debug_print_var($curr_val, $depth+1, $length);
|
||||
$results .= "<br>".str_repeat(' ', $depth*2)."<b>".strtr($curr_key, $_replace)."</b> => $return";
|
||||
}
|
||||
return $results;
|
||||
} else if (is_object($var)) {
|
||||
$object_vars = get_object_vars($var);
|
||||
$results = "<b>".get_class($var)." Object (".count($object_vars).")</b>";
|
||||
@@ -36,11 +35,11 @@ function smarty_modifier_debug_print_var($var, $depth = 0, $length = 40)
|
||||
$return = smarty_modifier_debug_print_var($curr_val, $depth+1, $length);
|
||||
$results .= "<br>".str_repeat(' ', $depth*2)."<b>$curr_key</b> => $return";
|
||||
}
|
||||
return $results;
|
||||
} else if (is_resource($var)) {
|
||||
$results = '<i>'.(string)$var.'</i>';
|
||||
} else if (empty($var) && $var != "0") {
|
||||
$results = '<i>empty</i>';
|
||||
} else {
|
||||
if (empty($var) && $var != "0") {
|
||||
return '<i>empty</i>';
|
||||
}
|
||||
if (strlen($var) > $length ) {
|
||||
$results = substr($var, 0, $length-3).'...';
|
||||
} else {
|
||||
@@ -48,8 +47,8 @@ function smarty_modifier_debug_print_var($var, $depth = 0, $length = 40)
|
||||
}
|
||||
$results = htmlspecialchars($results);
|
||||
$results = strtr($results, $_replace);
|
||||
return $results;
|
||||
}
|
||||
return $results;
|
||||
}
|
||||
|
||||
/* vim: set expandtab: */
|
||||
|
Reference in New Issue
Block a user