]> git.openstreetmap.org Git - nominatim.git/commitdiff
second argument of array_merge can be empty
authorMarc Tobias Metten <mtmail@gmx.net>
Sun, 13 Mar 2016 02:01:19 +0000 (03:01 +0100)
committerMarc Tobias Metten <mtmail@gmx.net>
Sun, 13 Mar 2016 02:01:19 +0000 (03:01 +0100)
lib/Geocode.php
website/reverse.php

index 1dbde919d4fda8975763af3e79d300206c6737a0..19ed354fa6c5793d53f838c08a4b32769065071e 100644 (file)
                                $oPlaceLookup->setPolygonSimplificationThreshold($this->fPolygonSimplificationThreshold);
 
                                $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')
                                {
                                        $aResult['class'] = 'place';
index d1c554a454352a79914f2f75a4096c182f8fa490..3254e710bda5048ee68b7f611ed6f30f3819d4a3 100755 (executable)
                $oPlaceLookup->setPolygonSimplificationThreshold($fThreshold);
 
                $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
        {