summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-11-20 16:15:10 +0300
committerAndrew Dolgov <[email protected]>2021-11-20 16:15:10 +0300
commit7cfc30ac25f01975ddca25efdb3ca600b030aa3b (patch)
treeeb0a879a89caebcc8772c5d2b900401e67cc386a /include
parent3323ae78ce4e021b4ffc00b96770fc23bbbc8e47 (diff)
format_backtrace: revise previous to only try truncating/adding actual strings
Diffstat (limited to 'include')
-rw-r--r--include/errorhandler.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/errorhandler.php b/include/errorhandler.php
index ff2af8cd0..30b6902b3 100644
--- a/include/errorhandler.php
+++ b/include/errorhandler.php
@@ -19,7 +19,7 @@ function format_backtrace($trace): string {
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 if ($a) {
+ } else if (is_string($a)) {
array_push($fmt_args, truncate_string($a, 256, "..."));
}
}