mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-26 11:08:13 +00:00
second argument of array_merge can be empty
This commit is contained in:
@@ -1647,8 +1647,11 @@
|
|||||||
$oPlaceLookup->setPolygonSimplificationThreshold($this->fPolygonSimplificationThreshold);
|
$oPlaceLookup->setPolygonSimplificationThreshold($this->fPolygonSimplificationThreshold);
|
||||||
|
|
||||||
$aOutlineResult = $oPlaceLookup->getOutlines($aResult['place_id'], $aResult['lon'], $aResult['lat'], $fDiameter/2);
|
$aOutlineResult = $oPlaceLookup->getOutlines($aResult['place_id'], $aResult['lon'], $aResult['lat'], $fDiameter/2);
|
||||||
$aResult = array_merge($aResult, $aOutlineResult);
|
if ($aOutlineResult)
|
||||||
|
{
|
||||||
|
$aResult = array_merge($aResult, $aOutlineResult);
|
||||||
|
}
|
||||||
|
|
||||||
if ($aResult['extra_place'] == 'city')
|
if ($aResult['extra_place'] == 'city')
|
||||||
{
|
{
|
||||||
$aResult['class'] = 'place';
|
$aResult['class'] = 'place';
|
||||||
|
|||||||
@@ -102,9 +102,12 @@
|
|||||||
$oPlaceLookup->setPolygonSimplificationThreshold($fThreshold);
|
$oPlaceLookup->setPolygonSimplificationThreshold($fThreshold);
|
||||||
|
|
||||||
$fRadius = $fDiameter = getResultDiameter($aPlace);
|
$fRadius = $fDiameter = getResultDiameter($aPlace);
|
||||||
$aOutlineResult = $oPlaceLookup->getOutlines($aPlace['place_id'],$aPlace['lon'],$aPlace['lat'],$fRadius);
|
$aOutlineResult = $oPlaceLookup->getOutlines($aPlace['place_id'], $aPlace['lon'], $aPlace['lat'], $fRadius);
|
||||||
|
|
||||||
$aPlace = array_merge($aPlace, $aOutlineResult);
|
if ($aOutlineResult)
|
||||||
|
{
|
||||||
|
$aPlace = array_merge($aPlace, $aOutlineResult);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user