]> git.openstreetmap.org Git - nominatim.git/commitdiff
check database results before using variable
authorMarc Tobias Metten <mtmail@gmx.net>
Wed, 18 Feb 2015 16:53:49 +0000 (17:53 +0100)
committerMarc Tobias Metten <mtmail@gmx.net>
Wed, 18 Feb 2015 16:53:49 +0000 (17:53 +0100)
lib/PlaceLookup.php

index f013fe176183422a6fbe49ed2630fad009cc40df..6da82fd8225bd9cdb31366f22f8724262926fe61 100644 (file)
                        $sSQL .= " from placex where place_id = ".(int)$this->iPlaceID;
                        $aPlace = $this->oDB->getRow($sSQL);
 
+                       if (PEAR::IsError($aPlace))
+                       {
+                               failInternalError("Could not lookup place.", $sSQL, $aPlace);
+                       }
                        if (!$aPlace['place_id']) return null;
 
                        if ($this->bAddressDetails)