X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/f1a388700f23fe39c09784402937037f7f3cb679..ff36d7d8df16d1a1d94656bda7b8b7d4b9422a3a:/lib/template/address-xml.php?ds=sidebyside
diff --git a/lib/template/address-xml.php b/lib/template/address-xml.php
index 6183b284..a17da738 100644
--- a/lib/template/address-xml.php
+++ b/lib/template/address-xml.php
@@ -11,7 +11,7 @@ echo " attribution='Data © OpenStreetMap contributors, ODbL 1.0. http://www.ope
echo " querystring='".htmlspecialchars($_SERVER['QUERY_STRING'], ENT_QUOTES)."'";
echo ">\n";
-if (!sizeof($aPlace)) {
+if (empty($aPlace)) {
if (isset($sError))
echo "$sError";
else echo 'Unable to geocode';
@@ -48,9 +48,9 @@ if (!sizeof($aPlace)) {
}
echo '>'.htmlspecialchars($aPlace['langaddress']).'';
- if (isset($aPlace['aAddress'])) {
+ if (isset($aPlace['address'])) {
echo '';
- foreach ($aPlace['aAddress'] as $sKey => $sValue) {
+ foreach ($aPlace['address']->getAddressNames() as $sKey => $sValue) {
$sKey = str_replace(' ', '_', $sKey);
echo "<$sKey>";
echo htmlspecialchars($sValue);