]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/AddressDetails.php
Merge pull request #1347 from mtmail/pdo-returns-proper-boolean
[nominatim.git] / lib / AddressDetails.php
index f52935863ce0c37d1a219fddb229d18efb1ff3a2..2d40c84f4efc35e90421798cc14f35a35bde3f68 100644 (file)
@@ -31,7 +31,7 @@ class AddressDetails
 
     private static function isAddress($aLine)
     {
-        return $aLine['isaddress'] == 't' || $aLine['type'] == 'country_code';
+        return $aLine['isaddress'] || $aLine['type'] == 'country_code';
     }
 
     public function getAddressDetails($bAll = false)
@@ -49,7 +49,7 @@ class AddressDetails
         $sPrevResult = '';
 
         foreach ($this->aAddressLines as $aLine) {
-            if ($aLine['isaddress'] == 't' && $sPrevResult != $aLine['localname']) {
+            if ($aLine['isaddress'] && $sPrevResult != $aLine['localname']) {
                 $sPrevResult = $aLine['localname'];
                 $aParts[] = $sPrevResult;
             }