check database results before using variable

This commit is contained in:
Marc Tobias Metten
2015-02-18 17:53:49 +01:00
parent 2b2b6ffadc
commit 3c2c3ab674

View File

@@ -51,6 +51,10 @@
$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)