X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/300ac4b77b8d78d1003dc4d02e2dbd88c5274200..6a4192d3d18e9db2dce7d8f9f1b229d5ae9f7c6f:/lib/template/search-geocodejson.php diff --git a/lib/template/search-geocodejson.php b/lib/template/search-geocodejson.php index dfb402bd..3e3a31c4 100644 --- a/lib/template/search-geocodejson.php +++ b/lib/template/search-geocodejson.php @@ -20,7 +20,9 @@ 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(