X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/ee0afe8c64023a98132a8e32a311eb71e3c5fa40..4d0693ea69f15660c7fd931c4bce7b648b97ff0f:/lib/template/address-jsonv2.php diff --git a/lib/template/address-jsonv2.php b/lib/template/address-jsonv2.php index d697730c..51d3e1a3 100644 --- a/lib/template/address-jsonv2.php +++ b/lib/template/address-jsonv2.php @@ -29,7 +29,7 @@ $aFilteredPlaces['display_name'] = $aPlace['langaddress']; $aFilteredPlaces['name'] = $aPlace['placename']; - if ($bShowAddressDetails) $aFilteredPlaces['address'] = $aAddress; + if ($bShowAddressDetails && $aAddress && sizeof($aAddress)) $aFilteredPlaces['address'] = $aAddress; } if (isset($_GET['json_callback']) && preg_match('/^[-A-Za-z0-9:_]+$/',$_GET['json_callback']))