mirror of
https://github.com/retailcrm/graphql-php.git
synced 2024-11-22 21:06:05 +03:00
Merge pull request #319 from jrots/master
Fix for fatal php error: Call to a member function getLocation() on null, before normal error handling
This commit is contained in:
commit
23fce6385f
@ -271,7 +271,7 @@ class Error extends \Exception implements \JsonSerializable, ClientAware
|
|||||||
$this->locations = array_filter(
|
$this->locations = array_filter(
|
||||||
array_map(
|
array_map(
|
||||||
function ($node) {
|
function ($node) {
|
||||||
if ($node->loc) {
|
if ($node->loc && $node->loc->source) {
|
||||||
return $node->loc->source->getLocation($node->loc->start);
|
return $node->loc->source->getLocation($node->loc->start);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user