X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/500c61685b16fd1d51e7b5f4738c788a9d00eab4..fd4ba3989ea8ac651d60c26829d01677bd14dd2d:/lib-php/AddressDetails.php diff --git a/lib-php/AddressDetails.php b/lib-php/AddressDetails.php index fc7fbec7..91e3d89f 100644 --- a/lib-php/AddressDetails.php +++ b/lib-php/AddressDetails.php @@ -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; } }