mirror of
https://github.com/retailcrm/graphql-php.git
synced 2024-11-22 12:56:05 +03:00
Merge pull request #336 from martiis/0.12.x
from master to 0.12.x - Call to a member function getLocation() on null
This commit is contained in:
commit
f2622fe7fb
@ -265,7 +265,7 @@ class Error extends \Exception implements \JsonSerializable, ClientAware
|
|||||||
}, $positions);
|
}, $positions);
|
||||||
} else if ($nodes) {
|
} else if ($nodes) {
|
||||||
$this->locations = array_filter(array_map(function ($node) {
|
$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);
|
return $node->loc->source->getLocation($node->loc->start);
|
||||||
}
|
}
|
||||||
}, $nodes));
|
}, $nodes));
|
||||||
|
Loading…
Reference in New Issue
Block a user