X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/500c61685b16fd1d51e7b5f4738c788a9d00eab4..27af9b102c2d6167b9025d594f8cb75e4dd76a03:/lib-php/template/details-json.php diff --git a/lib-php/template/details-json.php b/lib-php/template/details-json.php index a813b9a6..d2097261 100644 --- a/lib-php/template/details-json.php +++ b/lib-php/template/details-json.php @@ -96,11 +96,15 @@ if ($bIncludeHierarchy) { if ($bGroupHierarchy) { $aPlaceDetails['hierarchy'] = array(); foreach ($aHierarchyLines as $aAddressLine) { - if ($aAddressLine['type'] == 'yes') $sType = $aAddressLine['class']; - else $sType = $aAddressLine['type']; + if ($aAddressLine['type'] == 'yes') { + $sType = $aAddressLine['class']; + } else { + $sType = $aAddressLine['type']; + } - if (!isset($aPlaceDetails['hierarchy'][$sType])) + if (!isset($aPlaceDetails['hierarchy'][$sType])) { $aPlaceDetails['hierarchy'][$sType] = array(); + } $aPlaceDetails['hierarchy'][$sType][] = $funcMapAddressLine($aAddressLine); } } else {