]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/PlaceLookup.php
Merge branch 'master' of https://github.com/spin0us/Nominatim
[nominatim.git] / lib / PlaceLookup.php
index 07cf8062a8f8d99bcfc0b86f7fda603ecdb94612..3f1bdda8d8c5a670cc1e8a6b88acf360b9aaab0c 100644 (file)
@@ -37,6 +37,8 @@
 
                function lookup()
                {
+                       if (!$this->iPlaceID) return null;
+
                        $sLanguagePrefArraySQL = "ARRAY[".join(',',array_map("getDBQuoted", $this->aLangPrefOrder))."]";
 
                        $sSQL = "select placex.*,";
@@ -47,6 +49,8 @@
                        $sSQL .= " from placex where place_id = ".(int)$this->iPlaceID;
                        $aPlace = $this->oDB->getRow($sSQL);
 
+                       if (!$aPlace['place_id']) return null;
+
                        if ($this->bAddressDetails)
                        {
                                $aAddress = getAddressDetails($this->oDB, $sLanguagePrefArraySQL, $this->iPlaceID, $aPlace['calculated_country_code']);