From 51e5b0f6fefe9e4fa198cab0ee95c06451cbc341 Mon Sep 17 00:00:00 2001 From: smackintosh Date: Wed, 5 Jul 2023 08:48:10 +0100 Subject: [PATCH] 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. --- src/Provider/Here/Here.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Provider/Here/Here.php b/src/Provider/Here/Here.php index a5a260f3b..32ff011d4 100644 --- a/src/Provider/Here/Here.php +++ b/src/Provider/Here/Here.php @@ -255,7 +255,7 @@ private function executeQuery(string $url, int $limit): Collection /** @var HereAddress $address */ $address = $builder->build(HereAddress::class); - $address = $address->withLocationId($location['LocationId']); + $address = $address->withLocationId($location['LocationId'] ?? null); $address = $address->withLocationType($location['LocationType']); $address = $address->withAdditionalData(array_merge($additionalData, $extraAdditionalData)); $address = $address->withShape($location['Shape'] ?? null);