]> 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)
committerSarah Hoffmann <lonvia@denofr.de>
Sun, 20 Mar 2016 15:01:40 +0000 (16:01 +0100)
lib/Geocode.php
website/reverse.php

index 48055ec6780cbfe708a843e33070fc7ed869c22d..5efb2422c484e01a865f30f7c9776909b3b57d25 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 1f6e0aad1114f9acbd14e5baf210ef8cc4e792a9..b1a7d77e8ded60c6a3d4f7a0724ea61c6ce1deda 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
        {