X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/abf4dbd9505e9701f75c405c7ba1b3e3f1ecbd14..9afebddb16b09e09fa9a74624dcd79475b476f10:/lib/template/address-geocodejson.php?ds=sidebyside diff --git a/lib/template/address-geocodejson.php b/lib/template/address-geocodejson.php index 6ccbeb57..0066e80e 100644 --- a/lib/template/address-geocodejson.php +++ b/lib/template/address-geocodejson.php @@ -30,11 +30,13 @@ 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( - $aFilteredPlaces['properties']['geocoding'] + $aFilteredPlaces['properties']['geocoding'] ); $aFilteredPlaces['properties']['geocoding']['admin']