| Index: trunk/phase3/includes/json/FormatJson.php |
| — | — | @@ -49,11 +49,11 @@ |
| 50 | 50 | */ |
| 51 | 51 | public static function decode( $value, $assoc = false ) { |
| 52 | 52 | if ( !function_exists( 'json_decode' ) ) { |
| 53 | | - $json = new Services_JSON(); |
| | 53 | + if( $assoc ) |
| | 54 | + $json = new Services_JSON( SERVICES_JSON_LOOSE_TYPE ); |
| | 55 | + else |
| | 56 | + $json = new Services_JSON(); |
| 54 | 57 | $jsonDec = $json->decode( $value ); |
| 55 | | - if( $assoc ) { |
| 56 | | - $jsonDec = wfObjectToArray( $jsonDec ); |
| 57 | | - } |
| 58 | 58 | return $jsonDec; |
| 59 | 59 | } else { |
| 60 | 60 | return json_decode( $value, $assoc ); |