Skip to content

Commit ae06baa

Browse files
committed
Update UrbIS.php
Fix query if locale is not defined
1 parent 7ac2f63 commit ae06baa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

UrbIS.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public function geocodeQuery(GeocodeQuery $query): Collection
6464
}
6565

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

0 commit comments

Comments
 (0)