X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/cae0cf3546ef7a91ec27709c3b9e841fc82b15ed..75a5c7013fed767a7fda6658f6ffec34fdbbdede:/lib-php/AddressDetails.php diff --git a/lib-php/AddressDetails.php b/lib-php/AddressDetails.php index bf8defc2..91e3d89f 100644 --- a/lib-php/AddressDetails.php +++ b/lib-php/AddressDetails.php @@ -61,7 +61,7 @@ class AddressDetails return join(', ', $aParts); } - public function getAddressNames($sCountry = null) + public function getAddressNames() { $aAddress = array(); @@ -79,12 +79,11 @@ class AddressDetails $sName = $aLine['housenumber']; } - if (isset($sName)) { - if (!isset($aAddress[$sTypeLabel]) - || $aLine['class'] == 'place' - ) { - $aAddress[$sTypeLabel] = $sName; - } + if (isset($sName) + && (!isset($aAddress[$sTypeLabel]) + || $aLine['class'] == 'place') + ) { + $aAddress[$sTypeLabel] = $sName; } }