Protect against unwanted output that may corrupt the JSON results

SVN:2.0[2608]
This commit is contained in:
Denis Flaven
2013-02-27 16:16:22 +00:00
parent 194a7a2256
commit d02f761c11

View File

@@ -117,7 +117,7 @@ try
{
throw new Exception("Missing parameter 'json_data", RestResult::MISSING_JSON);
}
$aJsonData = json_decode($sJsonString);
$aJsonData = @json_decode($sJsonString);
if ($aJsonData == null)
{
throw new Exception("Parameter json_data is not a valid JSON structure", RestResult::INVALID_JSON);