From 3ec91d267b03777b54d5959f3e07f252e199f395 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Mon, 6 May 2013 21:19:12 +0200 Subject: [PATCH] fix missing number conversion for coordinates --- website/search.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/website/search.php b/website/search.php index 3655b5c3..816b248c 100755 --- a/website/search.php +++ b/website/search.php @@ -304,7 +304,8 @@ $sNearPointSQL = false; if (isset($_GET['nearlat']) && isset($_GET['nearlon'])) { - $sNearPointSQL = "ST_SetSRID(ST_Point(".(float)$_GET['nearlon'].",".$_GET['nearlat']."),4326)"; + $sNearPointSQL = "ST_SetSRID(ST_Point(".(float)$_GET['nearlon'].",".(float)$_GET['nearlat']."),4326)"; + echo '
--'.$sNearPointSQL.'--
'; $aSearches[0]['fLat'] = (float)$_GET['nearlat']; $aSearches[0]['fLon'] = (float)$_GET['nearlon']; $aSearches[0]['fRadius'] = 0.1; @@ -1265,7 +1266,7 @@ { if (isset($_GET['nearlat']) && trim($_GET['nearlat'])!=='' && isset($_GET['nearlon']) && trim($_GET['nearlon']) !== '') { - $iPlaceID = geocodeReverse($_GET['nearlat'], $_GET['nearlon']); + $iPlaceID = geocodeReverse((float)$_GET['nearlat'], (float)$_GET['nearlon']); if ($iPlaceID) { -- 2.39.5