From b25ecf13db2481cc6be7745424ef54ab2de6a4cb Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Sat, 1 Feb 2014 15:51:40 +0100 Subject: [PATCH] check correct variable for SQL error --- lib/lib.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/lib.php b/lib/lib.php index a75c3af7f..b2f85ca2a 100644 --- a/lib/lib.php +++ b/lib/lib.php @@ -846,12 +846,12 @@ function geocodeReverse($fLat, $fLon, $iZoom=18) $sSQL .= ' ORDER BY ST_distance('.$sPointSQL.', geometry) ASC limit 1'; //var_dump($sSQL); $aPlace = $oDB->getRow($sSQL); - $iPlaceID = $aPlace['place_id']; - if (PEAR::IsError($iPlaceID)) + if (PEAR::IsError($aPlace)) { - var_Dump($sSQL, $iPlaceID); + var_Dump($sSQL, $aPlace); exit; } + $iPlaceID = $aPlace['place_id']; } // The point we found might be too small - use the address to find what it is a child of