From: Bryan Tong Minh Date: Thu, 10 Mar 2011 12:02:35 +0000 (+0000) Subject: Add wfObjectToArray to json_decode to ensure that the return value is an array X-Git-Tag: 1.31.0-rc.0~31528 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmes_infos.php?a=commitdiff_plain;h=e01856391815c98b26997b0695d1815b826c6f5c;p=lhc%2Fweb%2Fwiklou.git Add wfObjectToArray to json_decode to ensure that the return value is an array --- diff --git a/includes/json/FormatJson.php b/includes/json/FormatJson.php index f9667f54ba..26f3762f20 100644 --- a/includes/json/FormatJson.php +++ b/includes/json/FormatJson.php @@ -58,7 +58,7 @@ class FormatJson { $jsonDec = $json->decode( $value ); return $jsonDec; } else { - return json_decode( $value, $assoc ); + return wfObjectToArray( json_decode( $value, $assoc ) ); } }