X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/42f079c35582f95381eee8f7406d3b2054204c51..1424e8e29bd54d3f713a38a834ff0c8ff5f463fb:/lib/Geocode.php diff --git a/lib/Geocode.php b/lib/Geocode.php index 7c43aec0..09c1ccb4 100644 --- a/lib/Geocode.php +++ b/lib/Geocode.php @@ -1197,12 +1197,12 @@ class Geocode $oReverse = new ReverseGeocode($this->oDB); $oReverse->setZoom(18); - $aLookup = $oReverse->lookupPoint($oCtx->sqlNear, false); + $oLookup = $oReverse->lookupPoint($oCtx->sqlNear, false); if (CONST_Debug) var_dump("Reverse search", $aLookup); - if ($aLookup['place_id']) { - $aResults = array($aLookup['place_id'] => new Result($aLookup['place_id'])); + if ($oLookup) { + $aResults = array($oLookup->iId => $oLookup); $aSearchResults = $this->getDetails($aResults, $oCtx); } else { $aSearchResults = array();