forked from hans/Nominatim
fix json output of empty arrays
This commit is contained in:
@@ -1789,7 +1789,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
$aResult['sExtraTags'] = array();
|
||||
$aResult['sExtraTags'] = (object) array();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1801,7 +1801,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
$aResult['sNameDetails'] = array();
|
||||
$aResult['sNameDetails'] = (object) array();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
$aPlace['sExtraTags'] = array();
|
||||
$aPlace['sExtraTags'] = (object) array();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
$aPlace['sNameDetails'] = array();
|
||||
$aPlace['sNameDetails'] = (object) array();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -26,5 +26,5 @@
|
||||
if (isset($aPlace['sNameDetails'])) $aFilteredPlaces['namedetails'] = $aPlace['sNameDetails'];
|
||||
}
|
||||
|
||||
javascript_renderData($aFilteredPlaces, JSON_FORCE_OBJECT);
|
||||
javascript_renderData($aFilteredPlaces);
|
||||
|
||||
|
||||
@@ -38,4 +38,4 @@
|
||||
if (isset($aPlace['sNameDetails'])) $aFilteredPlaces['namedetails'] = $aPlace['sNameDetails'];
|
||||
}
|
||||
|
||||
javascript_renderData($aFilteredPlaces, JSON_FORCE_OBJECT);
|
||||
javascript_renderData($aFilteredPlaces);
|
||||
|
||||
@@ -79,4 +79,4 @@
|
||||
$aFilteredPlaces[] = $aPlace;
|
||||
}
|
||||
|
||||
javascript_renderData($aFilteredPlaces, array('geojson'));
|
||||
javascript_renderData($aFilteredPlaces);
|
||||
|
||||
Reference in New Issue
Block a user