summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUrban Müller2023-05-15 14:50:38 +0200
committerUrban Müller2023-05-15 14:50:38 +0200
commit253e52e2d886a507654baf00063afe1114e0eb4d (patch)
treef4ca5d4f6c63b620d9ba6c67861111eb85bc1e6b
parent77da6f5583070b465b80e0ffca991ebb2aae171f (diff)
downloaditools-253e52e2d886a507654baf00063afe1114e0eb4d.tar.gz
itools-253e52e2d886a507654baf00063afe1114e0eb4d.tar.bz2
itools-253e52e2d886a507654baf00063afe1114e0eb4d.zip
use short notation for empty arrays in stackdump
-rw-r--r--it_debug.class4
1 files changed, 2 insertions, 2 deletions
diff --git a/it_debug.class b/it_debug.class
index 6d66d21..98f8484 100644
--- a/it_debug.class
+++ b/it_debug.class
@@ -241,8 +241,8 @@ static function backtrace($p = array())
$argstrings = [];
foreach ($frame['args'] as $arg)
{
- $t = trim(it::replace(['^array \(\s*' => "[", ',\n\)$' => "]", " +" => " ", "\n" => ""], var_export($arg, true)), " ,");
- $argstrings[] = strlen($t) < 80 ? $t : it::replace(["(.{0,60} |.{0,60}).*" => '$1'], $t) . "..." . (is_array($arg) ? "]" : (is_object($arg) ? "}" :""));
+ $t = trim(it::replace(['^array \(\s*' => "[", ',\n\)$' => "]", '^array \( \)' => "[]", " +" => " ", "\n" => ""], var_export($arg, true)), " ,");
+ $argstrings[] = strlen($t) < 60 ? $t : it::replace(["^(.{0,60} |.{0,60}).*" => '$1'], $t) . "..." . (is_array($arg) ? "]" : (is_object($arg) ? "}" :""));
}
$allargs = join(", ", $argstrings);