mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-26 11:08:13 +00: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:
@@ -101,12 +101,12 @@
|
|||||||
$sSQL .= ' ORDER BY ST_distance('.$sPointSQL.', geometry) ASC limit 1';
|
$sSQL .= ' ORDER BY ST_distance('.$sPointSQL.', geometry) ASC limit 1';
|
||||||
//var_dump($sSQL);
|
//var_dump($sSQL);
|
||||||
$aPlace = $oDB->getRow($sSQL);
|
$aPlace = $oDB->getRow($sSQL);
|
||||||
$iPlaceID = $aPlace['place_id'];
|
if (PEAR::IsError($aPlace))
|
||||||
$iParentPlaceID = $aPlace['parent_place_id'];
|
|
||||||
if (PEAR::IsError($iPlaceID))
|
|
||||||
{
|
{
|
||||||
failInternalError("Could not determine closest place.", $sSQL, $iPlaceID);
|
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
|
// The point we found might be too small - use the address to find what it is a child of
|
||||||
|
|||||||
Reference in New Issue
Block a user