mirror of
https://github.com/osm-search/Nominatim.git
synced 2024-11-23 05:35:13 +03:00
decode_json() always create arrays instead of objects
This commit is contained in:
parent
300612c5a8
commit
7cafec0750
@ -445,7 +445,7 @@ class PlaceLookup
|
||||
|
||||
if ($this->bExtraTags) {
|
||||
if ($aPlace['extra']) {
|
||||
$aPlace['sExtraTags'] = json_decode($aPlace['extra']);
|
||||
$aPlace['sExtraTags'] = json_decode($aPlace['extra'], true);
|
||||
} else {
|
||||
$aPlace['sExtraTags'] = (object) array();
|
||||
}
|
||||
@ -482,7 +482,7 @@ class PlaceLookup
|
||||
return (object) array();
|
||||
}
|
||||
|
||||
$aFullNames = json_decode($sNames);
|
||||
$aFullNames = json_decode($sNames, true);
|
||||
$aNames = array();
|
||||
|
||||
foreach ($aFullNames as $sKey => $sValue) {
|
||||
|
@ -56,7 +56,7 @@ if (empty($aPlace)) {
|
||||
}
|
||||
|
||||
if (isset($aPlace['asgeojson'])) {
|
||||
$aFilteredPlaces['geometry'] = json_decode($aPlace['asgeojson']);
|
||||
$aFilteredPlaces['geometry'] = json_decode($aPlace['asgeojson'], true);
|
||||
} else {
|
||||
$aFilteredPlaces['geometry'] = array(
|
||||
'type' => 'Point',
|
||||
|
@ -65,7 +65,7 @@ if (empty($aPlace)) {
|
||||
}
|
||||
|
||||
if (isset($aPlace['asgeojson'])) {
|
||||
$aFilteredPlaces['geometry'] = json_decode($aPlace['asgeojson']);
|
||||
$aFilteredPlaces['geometry'] = json_decode($aPlace['asgeojson'], true);
|
||||
} else {
|
||||
$aFilteredPlaces['geometry'] = array(
|
||||
'type' => 'Point',
|
||||
|
@ -63,7 +63,7 @@ if (empty($aPlace)) {
|
||||
}
|
||||
|
||||
if (isset($aPlace['asgeojson'])) {
|
||||
$aFilteredPlaces['geojson'] = json_decode($aPlace['asgeojson']);
|
||||
$aFilteredPlaces['geojson'] = json_decode($aPlace['asgeojson'], true);
|
||||
}
|
||||
|
||||
if (isset($aPlace['assvg'])) {
|
||||
|
@ -48,7 +48,7 @@ $aPlaceDetails['centroid'] = array(
|
||||
'coordinates' => array( (float) $aPointDetails['lon'], (float) $aPointDetails['lat'] )
|
||||
);
|
||||
|
||||
$aPlaceDetails['geometry'] = json_decode($aPointDetails['asgeojson']);
|
||||
$aPlaceDetails['geometry'] = json_decode($aPointDetails['asgeojson'], true);
|
||||
|
||||
$funcMapAddressLine = function ($aFull) {
|
||||
return array(
|
||||
|
@ -60,7 +60,7 @@ foreach ($aBatchResults as $aSearchResults) {
|
||||
}
|
||||
|
||||
if (isset($aPointDetails['asgeojson'])) {
|
||||
$aPlace['geojson'] = json_decode($aPointDetails['asgeojson']);
|
||||
$aPlace['geojson'] = json_decode($aPointDetails['asgeojson'], true);
|
||||
}
|
||||
|
||||
if (isset($aPointDetails['assvg'])) {
|
||||
|
@ -46,7 +46,7 @@ foreach ($aSearchResults as $iResNum => $aPointDetails) {
|
||||
}
|
||||
|
||||
if (isset($aPointDetails['asgeojson'])) {
|
||||
$aPlace['geometry'] = json_decode($aPointDetails['asgeojson']);
|
||||
$aPlace['geometry'] = json_decode($aPointDetails['asgeojson'], true);
|
||||
} else {
|
||||
$aPlace['geometry'] = array(
|
||||
'type' => 'Point',
|
||||
|
@ -54,7 +54,7 @@ foreach ($aSearchResults as $iResNum => $aPointDetails) {
|
||||
}
|
||||
|
||||
if (isset($aPointDetails['asgeojson'])) {
|
||||
$aPlace['geometry'] = json_decode($aPointDetails['asgeojson']);
|
||||
$aPlace['geometry'] = json_decode($aPointDetails['asgeojson'], true);
|
||||
} else {
|
||||
$aPlace['geometry'] = array(
|
||||
'type' => 'Point',
|
||||
|
@ -53,7 +53,7 @@ foreach ($aSearchResults as $iResNum => $aPointDetails) {
|
||||
}
|
||||
|
||||
if (isset($aPointDetails['asgeojson'])) {
|
||||
$aPlace['geojson'] = json_decode($aPointDetails['asgeojson']);
|
||||
$aPlace['geojson'] = json_decode($aPointDetails['asgeojson'], true);
|
||||
}
|
||||
|
||||
if (isset($aPointDetails['assvg'])) {
|
||||
|
Loading…
Reference in New Issue
Block a user