X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/ec8963f3d2e18a197aee8576889400fb058150d3..986956e4b43c8ca1890125c9cafcbb97bcc5325a:/lib/PlaceLookup.php?ds=sidebyside diff --git a/lib/PlaceLookup.php b/lib/PlaceLookup.php index 46b17882..c5aea588 100644 --- a/lib/PlaceLookup.php +++ b/lib/PlaceLookup.php @@ -52,7 +52,7 @@ class PlaceLookup { $aLangs = $oParams->getPreferredLanguages(); $this->aLangPrefOrderSql = - 'ARRAY['.join(',', array_map('getDBQuoted', $aLangs)).']'; + 'ARRAY['.join(',', $this->oDB->getDBQuotedList($aLangs)).']'; $this->bExtraTags = $oParams->getBool('extratags', false); $this->bNameDetails = $oParams->getBool('namedetails', false); @@ -132,8 +132,9 @@ class PlaceLookup public function setLanguagePreference($aLangPrefOrder) { - $this->aLangPrefOrderSql = - 'ARRAY['.join(',', array_map('getDBQuoted', $aLangPrefOrder)).']'; + $this->aLangPrefOrderSql = $this->oDB->getArraySQL( + $this->oDB->getDBQuotedList($aLangPrefOrder) + ); } private function addressImportanceSql($sGeometry, $sPlaceId) @@ -515,7 +516,7 @@ class PlaceLookup $aPointPolygon = chksql($this->oDB->getRow($sSQL), 'Could not get outline'); - if ($aPointPolygon['place_id']) { + if ($aPointPolygon && $aPointPolygon['place_id']) { if ($aPointPolygon['centrelon'] !== null && $aPointPolygon['centrelat'] !== null) { $aOutlineResult['lat'] = $aPointPolygon['centrelat']; $aOutlineResult['lon'] = $aPointPolygon['centrelon'];