diff options
author | Andrew Dolgov <[email protected]> | 2021-02-11 10:29:42 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2021-02-11 10:29:42 +0300 |
commit | cc646790fdda3b476b199032005e89ea59f3d7f3 (patch) | |
tree | 6a85996042b01fd92080a98b3334a3ac49be4899 /include/errorhandler.php | |
parent | 09e9f34bb495b435e826bce8cf716258039d4642 (diff) |
format_backtrace: don't try to use resources as strings
Diffstat (limited to 'include/errorhandler.php')
-rw-r--r-- | include/errorhandler.php | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/errorhandler.php b/include/errorhandler.php index 3643db98a..fab559b76 100644 --- a/include/errorhandler.php +++ b/include/errorhandler.php @@ -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, "...")); } |