Skip to content

Commit 4fe3fd0

Browse files
authored
Merge pull request #375 from Decyphr/v4
Add null check for location in GeoService
2 parents bfde737 + 5ad452e commit 4fe3fd0

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/services/GeoService.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -680,6 +680,10 @@ public static function normalizeLocation (mixed $location, string $country = nul
680680
else if (!is_array($location) || !isset($location['lat'], $location['lng']))
681681
$location = [];
682682

683+
if (!$location) {
684+
$location = [];
685+
}
686+
683687
return $location;
684688
}
685689

0 commit comments

Comments
 (0)