summaryrefslogtreecommitdiff
path: root/include/errorhandler.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/errorhandler.php')
-rw-r--r--include/errorhandler.php14
1 files changed, 10 insertions, 4 deletions
diff --git a/include/errorhandler.php b/include/errorhandler.php
index 188c8c5ce..16afcabcf 100644
--- a/include/errorhandler.php
+++ b/include/errorhandler.php
@@ -10,10 +10,12 @@ function format_backtrace($trace) {
if (is_array($e["args"])) {
foreach ($e["args"] as $a) {
- if (!is_object($a)) {
- array_push($fmt_args, $a);
- } else {
+ if (is_object($a)) {
array_push($fmt_args, "[" . get_class($a) . "]");
+ } else if (is_array($a)) {
+ array_push($fmt_args, "[" . truncate_string(json_encode($a), 128, "...")) . "]";
+ } else {
+ array_push($fmt_args, $a);
}
}
}
@@ -21,7 +23,11 @@ function format_backtrace($trace) {
$filename = str_replace(dirname(__DIR__) . "/", "", $e["file"]);
$rv .= sprintf("%d. %s(%s): %s(%s)\n",
- $idx, $filename, $e["line"], $e["function"], implode(", ", $fmt_args));
+ $idx,
+ $filename,
+ $e["line"],
+ $e["function"],
+ implode(", ", $fmt_args));
$idx++;
}