From 253e52e2d886a507654baf00063afe1114e0eb4d Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Mon, 15 May 2023 14:50:38 +0200 Subject: use short notation for empty arrays in stackdump --- it_debug.class | 4 ++-- 1 file 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); -- cgit v1.2.3