X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/80f6aca0c22984b79e24a19bc602258dd3caeb34..f5e56d1ef1e2631c67cc95bd124403410248fbdd:/lib-php/template/details-json.php diff --git a/lib-php/template/details-json.php b/lib-php/template/details-json.php index 0449dbb9..a813b9a6 100644 --- a/lib-php/template/details-json.php +++ b/lib-php/template/details-json.php @@ -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(); } }