aboutsummaryrefslogtreecommitdiffstats
path: root/includes/json
diff options
context:
space:
mode:
Diffstat (limited to 'includes/json')
-rw-r--r--includes/json/FormatJson.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/includes/json/FormatJson.php b/includes/json/FormatJson.php
index 126531419a24..04024f8d54c7 100644
--- a/includes/json/FormatJson.php
+++ b/includes/json/FormatJson.php
@@ -49,11 +49,11 @@ class FormatJson {
*/
public static function decode( $value, $assoc = false ) {
if ( !function_exists( 'json_decode' ) ) {
- $json = new Services_JSON();
+ if( $assoc )
+ $json = new Services_JSON( SERVICES_JSON_LOOSE_TYPE );
+ else
+ $json = new Services_JSON();
$jsonDec = $json->decode( $value );
- if( $assoc ) {
- $jsonDec = wfObjectToArray( $jsonDec );
- }
return $jsonDec;
} else {
return json_decode( $value, $assoc );