]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/template/search-geocodejson.php
also adapt uses of ClassTypes in website/
[nominatim.git] / lib / template / search-geocodejson.php
index dfb402bdb2f485a83a37bc99ad6cc674613c4ea6..3e3a31c443c7948b58e6f8c5500fc366b7f34ad0 100644 (file)
@@ -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(