Skip to content

Commit 5ad452e

Browse files
committed
added null check for location in GeoService -> normalizeLocation function
1 parent d8790cd commit 5ad452e

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)