From a88527b2a02359086e99599e5324934bb9e73338 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Sat, 30 Sep 2017 12:19:16 +0200 Subject: [PATCH] fix index when rechecking postcode name --- lib/Geocode.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Geocode.php b/lib/Geocode.php index 96ebbb13..a7987d24 100644 --- a/lib/Geocode.php +++ b/lib/Geocode.php @@ -752,7 +752,7 @@ class Geocode } elseif ($sPhraseType == 'postalcode' || ($aSearchTerm['class'] == 'place' && $aSearchTerm['type'] == 'postcode')) { // We need to try the case where the postal code is the primary element (i.e. no way to tell if it is (postalcode, city) OR (city, postalcode) so try both if ($aSearch['sPostcode'] === '' && $aSearch['sHouseNumber'] === '' && - isset($aSearchTerm['word_id']) && $aSearchTerm['word_id'] && strpos($sNormQuery, $this->normTerm($aSearchTerm['word'])) !== false) { + isset($aSearchTerm['word']) && $aSearchTerm['word'] && strpos($sNormQuery, $this->normTerm($aSearchTerm['word'])) !== false) { // If we have structured search or this is the first term, // make the postcode the primary search element. if ($aSearch['sOperator'] === '' && ($sPhraseType == 'postalcode' || ($iToken == 0 && $iPhrase == 0))) { -- 2.39.5