second argument of array_merge can be empty

This commit is contained in:
Marc Tobias Metten
2016-03-13 03:01:19 +01:00
parent 1d89098f77
commit 22ebd1c7a9
2 changed files with 10 additions and 4 deletions

View File

@@ -1647,7 +1647,10 @@
$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);
if ($aOutlineResult)
{
$aResult = array_merge($aResult, $aOutlineResult); $aResult = array_merge($aResult, $aOutlineResult);
}
if ($aResult['extra_place'] == 'city') if ($aResult['extra_place'] == 'city')
{ {

View File

@@ -102,10 +102,13 @@
$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);
if ($aOutlineResult)
{
$aPlace = array_merge($aPlace, $aOutlineResult); $aPlace = array_merge($aPlace, $aOutlineResult);
} }
}
else else
{ {
$aPlace = null; $aPlace = null;