From e3b0b9a0c740acb9722798eae393e1251499aa0c Mon Sep 17 00:00:00 2001 From: Aaron Piotrowski Date: Sat, 2 Dec 2017 10:03:38 -0600 Subject: [PATCH] Update backtrace formatting --- lib/Internal/functions.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/Internal/functions.php b/lib/Internal/functions.php index 8bf566c..1491274 100644 --- a/lib/Internal/functions.php +++ b/lib/Internal/functions.php @@ -14,7 +14,11 @@ namespace Amp\Internal; */ function formatStacktrace(array $trace): string { return \implode("\n", \array_map(function ($e, $i) { - $line = "#{$i} {$e['file']}:{$e['line']} "; + $line = "#{$i} "; + + if (isset($e["file"])) { + $line .= "{$e['file']}:{$e['line']} "; + } if ($e["type"]) { $line .= $e["class"] . $e["type"];