X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/1424e8e29bd54d3f713a38a834ff0c8ff5f463fb..914caab43d233a5eee17129f529a77c262bcc524:/website/reverse.php?ds=sidebyside diff --git a/website/reverse.php b/website/reverse.php index 19f1ae31..74bd700d 100755 --- a/website/reverse.php +++ b/website/reverse.php @@ -59,7 +59,12 @@ if ($sOsmType && $iOsmId > 0) { $oLookup = $oReverseGeocode->lookup($fLat, $fLon); if (CONST_Debug) var_dump($oLookup); - $aPlace = $oPlaceLookup->lookup($oLookup); + if ($oLookup) { + $aPlaces = $oPlaceLookup->lookup(array($oLookup->iId => $oLookup)); + if (sizeof($aPlaces)) { + $aPlace = reset($aPlaces); + } + } } elseif ($sOutputFormat != 'html') { userError("Need coordinates or OSM object to lookup."); }