]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/template/address-geocodejson.php
Merge branch 'separate-compilation' of https://github.com/eyusupov/Nominatim into...
[nominatim.git] / lib / template / address-geocodejson.php
index 98c368b324b0342b7cb3d2db804eec02337cde7c..0066e80e29adb13cce8320360c57eafddf7ba87e 100644 (file)
@@ -30,7 +30,9 @@ if (empty($aPlace)) {
 
     $aFilteredPlaces['properties']['geocoding']['label'] = $aPlace['langaddress'];
 
 
     $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(
 
     if (isset($aPlace['address'])) {
         $aPlace['address']->addGeocodeJsonAddressParts(