X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/6b65b9086b4434c6cc69bf4c8a3f778af5b91115..496e1b0616e120f6100c5ea23b89195416761228:/lib/template/address-json.php diff --git a/lib/template/address-json.php b/lib/template/address-json.php index c05bce29..2f077818 100644 --- a/lib/template/address-json.php +++ b/lib/template/address-json.php @@ -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);