remove warning in debug_print_var on php-resources

This commit is contained in:
messju
2003-11-27 17:39:06 +00:00
parent 6aa1003646
commit 7dfad44658
2 changed files with 6 additions and 6 deletions

1
NEWS
View File

@@ -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)

View File

@@ -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('&nbsp;', $depth*2)."<b>".strtr($curr_key, $_replace)."</b> =&gt; $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('&nbsp;', $depth*2)."<b>$curr_key</b> =&gt; $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: */