forked from hans/Nominatim
place lookup: filter places that have no details
In rare cases search_name might have entries for places for which we do not return details, in particular for linkees. Need to remove those entries in the result list before returning the details. Fixes #1932.
This commit is contained in:
@@ -456,6 +456,13 @@ class PlaceLookup
|
||||
$aResults[$aPlace['place_id']] = $aPlace;
|
||||
}
|
||||
|
||||
$aResults = array_filter(
|
||||
$aResults,
|
||||
function ($v) {
|
||||
return !($v instanceof Result);
|
||||
}
|
||||
);
|
||||
|
||||
Debug::printVar('Places', $aResults);
|
||||
|
||||
return $aResults;
|
||||
|
||||
Reference in New Issue
Block a user