Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 560f5cf

Browse files
FloppyChipssmackintosh
and
smackintosh
authored
Fix Reverse Geocode failure - Here maps - Undefined index: LocationId (#1190)
Here Issue 1189 Undefined index: LocationId at /var/www/api/html/releases/20230704155244/vendor/geocoder-php/here-provider/Here.php:258 Not all the location responses from Here maps reverse geocode API include LocationId, e.g. if the LocationType is area. Co-authored-by: smackintosh <[email protected]>
1 parent ec94d77 commit 560f5cf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Provider/Here/Here.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ private function executeQuery(string $url, int $limit): Collection
255255

256256
/** @var HereAddress $address */
257257
$address = $builder->build(HereAddress::class);
258-
$address = $address->withLocationId($location['LocationId']);
258+
$address = $address->withLocationId($location['LocationId'] ?? null);
259259
$address = $address->withLocationType($location['LocationType']);
260260
$address = $address->withAdditionalData(array_merge($additionalData, $extraAdditionalData));
261261
$address = $address->withShape($location['Shape'] ?? null);

0 commit comments

Comments
 (0)