X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/db3ced17bbfff00411f506d8c84419c875959d5e..1e86dc1d932a672f1c83b5abc2906016b7500de1:/lib-php/template/details-json.php?ds=inline 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(); } }