Skip to content

Commit

Permalink
Update UrbIS.php
Browse files Browse the repository at this point in the history
Fix query if locale is not defined
  • Loading branch information
jbelien committed Jan 19, 2018
1 parent 7ac2f63 commit ae06baa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion UrbIS.php
Expand Up @@ -64,7 +64,7 @@ public function geocodeQuery(GeocodeQuery $query): Collection
}

$language = '';
if (preg_match('/^(fr|nl).*$/', $query->getLocale(), $matches) === 1) {
if (!is_null($query->getLocale()) && preg_match('/^(fr|nl).*$/', $query->getLocale(), $matches) === 1) {
$language = $matches[1];
}

Expand Down

0 comments on commit ae06baa

Please sign in to comment.