mirror of
https://github.com/osm-search/Nominatim.git
synced 2025-01-08 22:49:15 +03:00
Fix wrong variable used with PEAR::IsError()
Fixes: PHP Fatal error: Cannot use object of type DB_Error as array in /home/daniele/Programmazione/OSM/Nominatim/website/reverse.php on line 104
This commit is contained in:
parent
980632053f
commit
9549bda474
@ -101,12 +101,12 @@
|
||||
$sSQL .= ' ORDER BY ST_distance('.$sPointSQL.', geometry) ASC limit 1';
|
||||
//var_dump($sSQL);
|
||||
$aPlace = $oDB->getRow($sSQL);
|
||||
$iPlaceID = $aPlace['place_id'];
|
||||
$iParentPlaceID = $aPlace['parent_place_id'];
|
||||
if (PEAR::IsError($iPlaceID))
|
||||
if (PEAR::IsError($aPlace))
|
||||
{
|
||||
failInternalError("Could not determine closest place.", $sSQL, $iPlaceID);
|
||||
}
|
||||
$iPlaceID = $aPlace['place_id'];
|
||||
$iParentPlaceID = $aPlace['parent_place_id'];
|
||||
}
|
||||
|
||||
// The point we found might be too small - use the address to find what it is a child of
|
||||
|
Loading…
Reference in New Issue
Block a user