From 770754ae2c92c885057cbc1df43c9a4ecb0b6c92 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Thu, 27 Aug 2020 09:33:21 +0200 Subject: [PATCH] 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. --- lib/PlaceLookup.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/PlaceLookup.php b/lib/PlaceLookup.php index 0a285a6a..a2f39ea3 100644 --- a/lib/PlaceLookup.php +++ b/lib/PlaceLookup.php @@ -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; -- 2.39.5