X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/0c714f12b4137017e842a10cda0f47839a84dfb9..932d945b7f897fd18be7d4c2fac3eda3915aa296:/lib/template/address-jsonv2.php diff --git a/lib/template/address-jsonv2.php b/lib/template/address-jsonv2.php index 32fe0f13..96247182 100644 --- a/lib/template/address-jsonv2.php +++ b/lib/template/address-jsonv2.php @@ -26,7 +26,7 @@ $aFilteredPlaces['display_name'] = $aPlace['langaddress']; $aFilteredPlaces['name'] = $aPlace['placename']; - if ($bShowAddressDetails) $aFilteredPlaces['address'] = $aAddress; + if ($bShowAddressDetails && $aAddress && sizeof($aAddress)) $aFilteredPlaces['address'] = $aAddress; } javascript_renderData($aFilteredPlaces);