X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/6a7e0d652b1d40a397e1c1386d500101796676c4..e80d521c090e218663d739248c2ea6c1d0bd40b4:/lib-php/template/address-geocodejson.php?ds=sidebyside diff --git a/lib-php/template/address-geocodejson.php b/lib-php/template/address-geocodejson.php index 0066e80e..927f3861 100644 --- a/lib-php/template/address-geocodejson.php +++ b/lib-php/template/address-geocodejson.php @@ -5,9 +5,11 @@ $aFilteredPlaces = array(); if (empty($aPlace)) { - if (isset($sError)) + if (isset($sError)) { $aFilteredPlaces['error'] = $sError; - else $aFilteredPlaces['error'] = 'Unable to geocode'; + } else { + $aFilteredPlaces['error'] = 'Unable to geocode'; + } javascript_renderData($aFilteredPlaces); } else { $aFilteredPlaces = array( @@ -17,7 +19,9 @@ if (empty($aPlace)) { ) ); - if (isset($aPlace['place_id'])) $aFilteredPlaces['properties']['geocoding']['place_id'] = $aPlace['place_id']; + if (isset($aPlace['place_id'])) { + $aFilteredPlaces['properties']['geocoding']['place_id'] = $aPlace['place_id']; + } $sOSMType = formatOSMType($aPlace['osm_type']); if ($sOSMType) { $aFilteredPlaces['properties']['geocoding']['osm_type'] = $sOSMType;