Skip to content

Commit

Permalink
check correct variable for SQL error
Browse files Browse the repository at this point in the history
  • Loading branch information
lonvia committed Feb 1, 2014
1 parent 2df5d39 commit b25ecf1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/lib.php
Expand Up @@ -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
Expand Down

0 comments on commit b25ecf1

Please sign in to comment.