X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/2db6f931b6ce1d331433f7e4f02ac332381a7b29..00cd69ea237c44fa76d450739240fab3223b845f:/website/reverse.php?ds=sidebyside diff --git a/website/reverse.php b/website/reverse.php index ed877899..d70a11e9 100755 --- a/website/reverse.php +++ b/website/reverse.php @@ -33,10 +33,8 @@ $oPlaceLookup->setOSMID($_GET['osm_type'], $_GET['osm_id']); $aPlace = $oPlaceLookup->lookup(); - - //if (!$iPlaceID) $sError = 'OSM ID Not Found'; } - else + else if (isset($_GET['lat']) && isset($_GET['lon']) && preg_match('/^[+-]?[0-9]*\.?[0-9]+$/', $_GET['lat']) && preg_match('/^[+-]?[0-9]*\.?[0-9]+$/', $_GET['lon'])) { $oReverseGeocode = new ReverseGeocode($oDB); $oReverseGeocode->setLanguagePreference($aLangPrefOrder); @@ -47,6 +45,12 @@ $aPlace = $oReverseGeocode->lookup(); } + else + { + $aPlace = null; + } + + logEnd($oDB, $hLog, sizeof($aPlace)?1:0); if (CONST_Debug) exit;