forked from hans/Nominatim
fix 500 on reverse via search without result
e.g. /search?q=1,1
This commit is contained in:
@@ -1266,8 +1266,10 @@
|
|||||||
if (isset($_GET['nearlat']) && trim($_GET['nearlat'])!=='' && isset($_GET['nearlon']) && trim($_GET['nearlon']) !== '')
|
if (isset($_GET['nearlat']) && trim($_GET['nearlat'])!=='' && isset($_GET['nearlon']) && trim($_GET['nearlon']) !== '')
|
||||||
{
|
{
|
||||||
$iPlaceID = geocodeReverse($_GET['nearlat'], $_GET['nearlon']);
|
$iPlaceID = geocodeReverse($_GET['nearlat'], $_GET['nearlon']);
|
||||||
$aResultPlaceIDs = array($iPlaceID);
|
|
||||||
|
|
||||||
|
if ($iPlaceID)
|
||||||
|
{
|
||||||
|
$aResultPlaceIDs = array($iPlaceID);
|
||||||
// TODO: this needs refactoring!
|
// TODO: this needs refactoring!
|
||||||
|
|
||||||
// Get the details for display (is this a redundant extra step?)
|
// Get the details for display (is this a redundant extra step?)
|
||||||
@@ -1334,6 +1336,11 @@
|
|||||||
failInternalError("Could not get details for place (near).", $sSQL, $aSearchResults);
|
failInternalError("Could not get details for place (near).", $sSQL, $aSearchResults);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$aSearchResults = array();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user