From: Sarah Hoffmann Date: Thu, 1 May 2014 13:38:31 +0000 (+0200) Subject: fix PHP warnings about undefined variables X-Git-Tag: v2.3.0~37 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/70deb7883e1c4dd4d9e36e8e1552511e9a49a68c?ds=sidebyside;hp=7b24f728709f73eee6f5cc9c87e7561caef2b746 fix PHP warnings about undefined variables --- diff --git a/lib/Geocode.php b/lib/Geocode.php index 19fad13d..e1cb9b1a 100644 --- a/lib/Geocode.php +++ b/lib/Geocode.php @@ -1181,6 +1181,10 @@ if (CONST_Debug) var_dump($sSQL); $aPlaceIDs = $this->oDB->getCol($sSQL); } + else + { + $aPlaceIDs = array(); + } } else { @@ -1463,7 +1467,7 @@ } if ($sCountryCodesSQL) $sSQL .= " and lp.calculated_country_code in ($sCountryCodesSQL)"; if ($sOrderBySQL) $sSQL .= "order by ".$sOrderBySQL." asc"; - if ($iOffset) $sSQL .= " offset $iOffset"; + if ($this->iOffset) $sSQL .= " offset $this->iOffset"; $sSQL .= " limit $this->iLimit"; if (CONST_Debug) var_dump($sSQL); $aClassPlaceIDs = array_merge($aClassPlaceIDs, $this->oDB->getCol($sSQL)); @@ -1485,7 +1489,7 @@ } if ($sCountryCodesSQL) $sSQL .= " and l.calculated_country_code in ($sCountryCodesSQL)"; if ($sOrderBy) $sSQL .= "order by ".$OrderBysSQL." asc"; - if ($iOffset) $sSQL .= " offset $iOffset"; + if ($this->iOffset) $sSQL .= " offset $this->iOffset"; $sSQL .= " limit $this->iLimit"; if (CONST_Debug) var_dump($sSQL); $aClassPlaceIDs = array_merge($aClassPlaceIDs, $this->oDB->getCol($sSQL));