X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/1faa0f4d41da125dfb35d20dc2449e87f2497e20..e0e18e2b6f4b5e12f35aa80a41c77263221bd730:/lib/PlaceLookup.php diff --git a/lib/PlaceLookup.php b/lib/PlaceLookup.php index 9cc62f6c..a2f39ea3 100644 --- a/lib/PlaceLookup.php +++ b/lib/PlaceLookup.php @@ -449,14 +449,23 @@ class PlaceLookup } $aPlace['addresstype'] = ClassTypes\getLabelTag( - $aPlace, - $aPlace['country_code'] + $aPlace, + $aPlace['country_code'] ); + + $aResults[$aPlace['place_id']] = $aPlace; } - Debug::printVar('Places', $aPlaces); + $aResults = array_filter( + $aResults, + function ($v) { + return !($v instanceof Result); + } + ); + + Debug::printVar('Places', $aResults); - return $aPlaces; + return $aResults; } /* returns an array which will contain the keys