From 3c2c3ab67411f500ca2b0658b088127a9ba4169a Mon Sep 17 00:00:00 2001 From: Marc Tobias Metten Date: Wed, 18 Feb 2015 17:53:49 +0100 Subject: [PATCH] check database results before using variable --- lib/PlaceLookup.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/PlaceLookup.php b/lib/PlaceLookup.php index f013fe17..6da82fd8 100644 --- a/lib/PlaceLookup.php +++ b/lib/PlaceLookup.php @@ -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) -- 2.39.5