From: Sarah Hoffmann Date: Sat, 1 Feb 2014 14:51:40 +0000 (+0100) Subject: check correct variable for SQL error X-Git-Tag: v2.2.0~13 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/b25ecf13db2481cc6be7745424ef54ab2de6a4cb check correct variable for SQL error --- diff --git a/lib/lib.php b/lib/lib.php index a75c3af7..b2f85ca2 100644 --- a/lib/lib.php +++ b/lib/lib.php @@ -846,12 +846,12 @@ $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