1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 05:25:56 +00:00

format_backtrace: don't try to use resources as strings

This commit is contained in:
Andrew Dolgov
2021-02-11 10:29:42 +03:00
parent 09e9f34bb4
commit cc646790fd

View File

@@ -14,6 +14,8 @@ function format_backtrace($trace) {
array_push($fmt_args, "{" . get_class($a) . "}");
} else if (is_array($a)) {
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 {
array_push($fmt_args, truncate_string($a, 256, "..."));
}