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:
Sarah Hoffmann
2020-08-27 09:33:21 +02:00
parent a932855f6f
commit 770754ae2c

View File

@@ -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;