Ver código fonte

Protect against unwanted output that may corrupt the JSON results

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@2607 a333f486-631f-4898-b8df-5754b55c2be0
dflaven 12 anos atrás
pai
commit
ff2a086c09
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1 1
      webservices/rest.php

+ 1 - 1
webservices/rest.php

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