]> git.openstreetmap.org Git - nominatim.git/commitdiff
check for correct array for country codes
authorSarah Hoffmann <lonvia@denofr.de>
Tue, 4 Oct 2016 18:32:22 +0000 (20:32 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Tue, 4 Oct 2016 18:32:22 +0000 (20:32 +0200)
fixes trac ticket 5427

lib/Geocode.php
tests/features/api/regression.feature

index ec7728d2d2cf9e5fc7c5916695cabe68bc28da3c..cf05df12d4497ac3202b2b12e1b8363a0aad7103 100644 (file)
@@ -252,7 +252,7 @@ class Geocode
                     $aCountries[] = strtolower($sCountryCode);
                 }
             }
-            if (isset($aCountryCodes))
+            if (isset($aCountries))
                 $this->aCountryCodes = $aCountries;
         }
 
index c50ab7df031430776fb5e661e112b03c57be8338..34603aec8f18b02f15dce8e170f84d1f472232c4 100644 (file)
@@ -207,3 +207,11 @@ Feature: API regression tests
          | osm_type   | osm_id     | latlon
          | node       | 257363453  | 35.8404121,128.5586643 +-100m
 
+    Scenario: trac #5427
+        Given the request parameters
+         | countrycodes |
+         | DE           |
+        When sending json search query "12345" with address
+        Then result addresses contain
+         | country_code |
+         | de           |