X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/300ac4b77b8d78d1003dc4d02e2dbd88c5274200..d3f7465ccad9cce6c84f0b089282c5ece550c5ed:/lib/template/address-geocodejson.php diff --git a/lib/template/address-geocodejson.php b/lib/template/address-geocodejson.php index 98c368b3..0066e80e 100644 --- a/lib/template/address-geocodejson.php +++ b/lib/template/address-geocodejson.php @@ -30,7 +30,9 @@ if (empty($aPlace)) { $aFilteredPlaces['properties']['geocoding']['label'] = $aPlace['langaddress']; - $aFilteredPlaces['properties']['geocoding']['name'] = $aPlace['placename']; + if ($aPlace['placename'] !== null) { + $aFilteredPlaces['properties']['geocoding']['name'] = $aPlace['placename']; + } if (isset($aPlace['address'])) { $aPlace['address']->addGeocodeJsonAddressParts(