From 6c076e21d4850a9308330647368e236cf6d68a94 Mon Sep 17 00:00:00 2001 From: vladar Date: Fri, 21 Oct 2016 18:36:49 +0700 Subject: [PATCH] Another minor improvement to error formatting --- src/Error/FormattedError.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Error/FormattedError.php b/src/Error/FormattedError.php index 0106f25..68b42ea 100644 --- a/src/Error/FormattedError.php +++ b/src/Error/FormattedError.php @@ -72,6 +72,11 @@ class FormattedError array_shift($trace); } + // Remove root call as it's likely error handler trace: + else if (!isset($trace[0]['file'])) { + array_shift($trace); + } + return array_map(function($err) { $safeErr = array_intersect_key($err, ['file' => true, 'line' => true]);