From e01856391815c98b26997b0695d1815b826c6f5c Mon Sep 17 00:00:00 2001 From: Bryan Tong Minh Date: Thu, 10 Mar 2011 12:02:35 +0000 Subject: [PATCH] Add wfObjectToArray to json_decode to ensure that the return value is an array --- includes/json/FormatJson.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ) ); } } -- 2.20.1