mirror of
https://github.com/retailcrm/graphql-php.git
synced 2025-04-02 20:26:09 +03:00
Another minor improvement to error formatting
This commit is contained in:
parent
7f1d74f980
commit
6c076e21d4
1 changed files with 5 additions and 0 deletions
|
@ -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]);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue