From: Sarah Hoffmann Date: Tue, 4 Oct 2016 18:32:22 +0000 (+0200) Subject: check for correct array for country codes X-Git-Tag: v3.0.0~115 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/42d473968f635146a4e31796cdbed365bed434d5?ds=sidebyside;hp=--cc check for correct array for country codes fixes trac ticket 5427 --- 42d473968f635146a4e31796cdbed365bed434d5 diff --git a/lib/Geocode.php b/lib/Geocode.php index ec7728d2..cf05df12 100644 --- a/lib/Geocode.php +++ b/lib/Geocode.php @@ -252,7 +252,7 @@ class Geocode $aCountries[] = strtolower($sCountryCode); } } - if (isset($aCountryCodes)) + if (isset($aCountries)) $this->aCountryCodes = $aCountries; } diff --git a/tests/features/api/regression.feature b/tests/features/api/regression.feature index c50ab7df..34603aec 100644 --- a/tests/features/api/regression.feature +++ b/tests/features/api/regression.feature @@ -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 |