]> git.openstreetmap.org Git - nominatim.git/commitdiff
ignore isaddress in details output when it is not present
authorSarah Hoffmann <lonvia@denofr.de>
Wed, 8 Apr 2020 08:28:28 +0000 (10:28 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Wed, 8 Apr 2020 08:28:28 +0000 (10:28 +0200)
lib/template/details-json.php

index fe184dfea2d8c1e910b5fdf7e6ff41104efb070b..d5338a05a1a58e23b388d4c56028c308ce8feea9 100644 (file)
@@ -53,7 +53,7 @@ $funcMapAddressLine = function ($aFull) {
                 'admin_level' => isset($aFull['admin_level']) ? (int) $aFull['admin_level'] : null,
                 'rank_address' => $aFull['rank_address'] ? (int) $aFull['rank_address'] : null,
                 'distance' => (float) $aFull['distance'],
                 'admin_level' => isset($aFull['admin_level']) ? (int) $aFull['admin_level'] : null,
                 'rank_address' => $aFull['rank_address'] ? (int) $aFull['rank_address'] : null,
                 'distance' => (float) $aFull['distance'],
-                'isaddress' => (bool) $aFull['isaddress']
+                'isaddress' => isset($aFull['isaddress']) ? (bool) $aFull['isaddress'] : null
                );
 
     return $aMapped;
                );
 
     return $aMapped;