check correct variable for SQL error

This commit is contained in:
Sarah Hoffmann
2014-02-01 15:51:40 +01:00
parent 2df5d391de
commit b25ecf13db

View File

@@ -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