X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/d3f7465ccad9cce6c84f0b089282c5ece550c5ed..a1f8380676ebbe531a425d663a6c562f6d1c8fec:/lib/PlaceLookup.php?ds=sidebyside diff --git a/lib/PlaceLookup.php b/lib/PlaceLookup.php index eebfe983..a2f39ea3 100644 --- a/lib/PlaceLookup.php +++ b/lib/PlaceLookup.php @@ -452,11 +452,20 @@ class PlaceLookup $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