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:
Vladimir Razuvaev 2018-08-20 16:27:10 +07:00 committed by GitHub
commit 23fce6385f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);
}
},