]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/template/address-json.php
Merge remote-tracking branch 'upstream/master'
[nominatim.git] / lib / template / address-json.php
index c05bce294e1837279815fd04ca69bf8c43787f30..2f0778187f9cce63ff0c2cc5c877ba282cb6bc5b 100644 (file)
@@ -3,7 +3,7 @@
 
        if (!sizeof($aPlace))
        {
-               if ($sError)
+               if (isset($sError))
                        $aFilteredPlaces['error'] = $sError;
                else
                        $aFilteredPlaces['error'] = 'Unable to geocode';
@@ -21,7 +21,7 @@
                 if (isset($aPlace['lat'])) $aFilteredPlaces['lat'] = $aPlace['lat'];
                 if (isset($aPlace['lon'])) $aFilteredPlaces['lon'] = $aPlace['lon'];
                $aFilteredPlaces['display_name'] = $aPlace['langaddress'];
-               if ($bShowAddressDetails) $aFilteredPlaces['address'] = $aAddress;
+               if ($bShowAddressDetails) $aFilteredPlaces['address'] = $aPlace['aAddress'];
        }
 
        javascript_renderData($aFilteredPlaces);