]> git.openstreetmap.org Git - nominatim.git/commitdiff
fix variable typo when filtering results
authorSarah Hoffmann <lonvia@denofr.de>
Wed, 25 Oct 2017 18:16:35 +0000 (20:16 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Wed, 25 Oct 2017 18:25:23 +0000 (20:25 +0200)
Fixes #830 and #832.

lib/SearchDescription.php
test/bdd/api/search/structured.feature

index 702e7dea2c583d0aabfde10484ee454ca3458d2d..edf4d059403e5231660d190006f92052bd788e71 100644 (file)
@@ -465,7 +465,7 @@ class SearchDescription
                 if ($aFilteredPlaceIDs) {
                     $aNewResults = array();
                     foreach ($aFilteredPlaceIDs as $iPlaceId) {
-                        $aNewResults[$iPlaceId] = $aResults[$iPLaceId];
+                        $aNewResults[$iPlaceId] = $aResults[$iPlaceId];
                     }
                     $aResults = $aNewResults;
                     if (CONST_Debug) {
index f45a1a6dcaac19bcd04764d08211ec88b0d06cf3..ec7eb1be68631cd0a45b5c0cbc3a386f05a42ae5 100644 (file)
@@ -31,6 +31,22 @@ Feature: Structured search queries
           | attr        | value |
           | querystring | Old Palace Road, GU2 7UP, United Kingdom |
 
+    Scenario: Street with housenumber, city and postcode
+        When sending xml search query "" with address
+          | street             | city  | postalcode |
+          | 19 Am schrägen Weg | Vaduz | 9490       |
+        Then result addresses contain
+          | house_number | road |
+          | 19           | Am Schrägen Weg |
+
+    Scenario: Street with housenumber, city and bad postcode
+        When sending xml search query "" with address
+          | street             | city  | postalcode |
+          | 19 Am schrägen Weg | Vaduz | 9491       |
+        Then result addresses contain
+          | house_number | road |
+          | 19           | Am Schrägen Weg |
+
     Scenario: Amenity, city
         When sending json search query "" with address
           | city  | amenity |