]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/PlaceLookup.php
fix typo
[nominatim.git] / lib / PlaceLookup.php
index 9cc62f6c8ecc0f03e6a1c7b9497f3fc2b578c313..a2f39ea348ba466e21111a1e6f65395eb8343f57 100644 (file)
@@ -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