Protect against unwanted output that may corrupt the JSON results

SVN:trunk[2607]
This commit is contained in:
Denis Flaven
2013-02-27 16:14:16 +00:00
parent ddff9180ac
commit 9013910cec

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);