From f78d094483da1c54ff51177cafa378406636b433 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Wed, 25 Oct 2017 20:16:35 +0200 Subject: [PATCH] fix variable typo when filtering results Fixes #830 and #832. --- lib/SearchDescription.php | 2 +- test/bdd/api/search/structured.feature | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/lib/SearchDescription.php b/lib/SearchDescription.php index 702e7dea..edf4d059 100644 --- a/lib/SearchDescription.php +++ b/lib/SearchDescription.php @@ -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) { diff --git a/test/bdd/api/search/structured.feature b/test/bdd/api/search/structured.feature index f45a1a6d..ec7eb1be 100644 --- a/test/bdd/api/search/structured.feature +++ b/test/bdd/api/search/structured.feature @@ -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 | -- 2.39.5