]> git.openstreetmap.org Git - nominatim.git/commitdiff
Merge pull request #2332 from lonvia/fix-keyword-details
authorSarah Hoffmann <lonvia@denofr.de>
Tue, 18 May 2021 09:30:58 +0000 (11:30 +0200)
committerGitHub <noreply@github.com>
Tue, 18 May 2021 09:30:58 +0000 (11:30 +0200)
Always use object type for details keywords

lib-php/template/details-json.php

index 0449dbb94f20916c26b1f68562e0ea185d7d3807..a813b9a6524efc4e912c71ecc07a7f2884c925f5 100644 (file)
@@ -81,10 +81,14 @@ if ($bIncludeKeywords) {
 
     if ($aPlaceSearchNameKeywords) {
         $aPlaceDetails['keywords']['name'] = array_map($funcMapKeyword, $aPlaceSearchNameKeywords);
+    } else {
+        $aPlaceDetails['keywords']['name'] = array();
     }
 
     if ($aPlaceSearchAddressKeywords) {
         $aPlaceDetails['keywords']['address'] = array_map($funcMapKeyword, $aPlaceSearchAddressKeywords);
+    } else {
+        $aPlaceDetails['keywords']['address'] = array();
     }
 }