]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/PlaceLookup.php
reorganise path settings in config
[nominatim.git] / lib / PlaceLookup.php
index 0a285a6a78b69ab7b5b9f16c8493a7f1c22718bb..58510e266f5a99da705c5ca2303d5c4d3a59f26c 100644 (file)
@@ -2,8 +2,8 @@
 
 namespace Nominatim;
 
-require_once(CONST_BasePath.'/lib/AddressDetails.php');
-require_once(CONST_BasePath.'/lib/Result.php');
+require_once(CONST_LibDir.'/AddressDetails.php');
+require_once(CONST_LibDir.'/Result.php');
 
 class PlaceLookup
 {
@@ -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;