diff options
Diffstat (limited to 'it_debug.class')
-rw-r--r-- | it_debug.class | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/it_debug.class b/it_debug.class index 8bd6099..5ed466a 100644 --- a/it_debug.class +++ b/it_debug.class @@ -240,7 +240,7 @@ static function backtrace($p = array()) $locations[] = basename($frame['file']) . ":" . $frame['line']; $argstrings = []; - foreach ($frame['args'] as $arg) + foreach ((array)$frame['args'] as $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) ? "}" :"")); @@ -260,12 +260,12 @@ static function backtrace($p = array()) } else { - foreach (self::debug_backtrace($p) as $call) + foreach (self::debug_backtrace($p) as $frame) { - $fn = $call['file']; + $fn = $frame['file']; $fn = (it::match('auto_prepend', $fn) ? basename(dirname(dirname($fn))) . "/" : (it::match('/(cgi|bin)/', $fn) ? basename(dirname($fn)) . "/" : "")) . basename($fn); if ($fn) - $result[] = $fn . ":" . $call['line']; + $result[] = $fn . ":" . $frame['line']; } $result = implode(" ", (array)$result); |