Skip to content
Snippets Groups Projects
Commit cc646790 authored by Andrew Dolgov's avatar Andrew Dolgov
Browse files

format_backtrace: don't try to use resources as strings

parent 09e9f34b
No related branches found
No related tags found
No related merge requests found
...@@ -14,6 +14,8 @@ function format_backtrace($trace) { ...@@ -14,6 +14,8 @@ function format_backtrace($trace) {
array_push($fmt_args, "{" . get_class($a) . "}"); array_push($fmt_args, "{" . get_class($a) . "}");
} else if (is_array($a)) { } else if (is_array($a)) {
array_push($fmt_args, "[" . truncate_string(json_encode($a), 256, "...")) . "]"; array_push($fmt_args, "[" . truncate_string(json_encode($a), 256, "...")) . "]";
} else if (is_resource($a)) {
array_push($fmt_args, truncate_string(get_resource_type($a), 256, "..."));
} else { } else {
array_push($fmt_args, truncate_string($a, 256, "...")); array_push($fmt_args, truncate_string($a, 256, "..."));
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment