mirror of
https://github.com/retailcrm/graphql-php.git
synced 2025-02-16 20:33:14 +03:00
Fix: fatal Call to a member function getLocation(), before normal error is thrown
This commit is contained in:
parent
392b567f23
commit
942d4995c5
@ -271,7 +271,7 @@ class Error extends \Exception implements \JsonSerializable, ClientAware
|
||||
$this->locations = array_filter(
|
||||
array_map(
|
||||
function ($node) {
|
||||
if ($node->loc) {
|
||||
if ($node->loc && $node->loc->source) {
|
||||
return $node->loc->source->getLocation($node->loc->start);
|
||||
}
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user