X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/abf4dbd9505e9701f75c405c7ba1b3e3f1ecbd14..bb6c8d45fe688b593caedf359a3c19acfec7dad1:/lib/template/search-geocodejson.php diff --git a/lib/template/search-geocodejson.php b/lib/template/search-geocodejson.php index c046b4af..3e3a31c4 100644 --- a/lib/template/search-geocodejson.php +++ b/lib/template/search-geocodejson.php @@ -20,11 +20,13 @@ foreach ($aSearchResults as $iResNum => $aPointDetails) { $aPlace['properties']['geocoding']['label'] = $aPointDetails['langaddress']; - $aPlace['properties']['geocoding']['name'] = $aPointDetails['placename']; + if ($aPointDetails['placename'] !== null) { + $aPlace['properties']['geocoding']['name'] = $aPointDetails['placename']; + } if (isset($aPointDetails['address'])) { $aPointDetails['address']->addGeocodeJsonAddressParts( - $aPlace['properties']['geocoding'] + $aPlace['properties']['geocoding'] ); $aPlace['properties']['geocoding']['admin']