From 50fe92ffb8eaab3a51834af68bb69df0d1bd2832 Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Wed, 11 Aug 2010 12:45:59 +0000 Subject: [PATCH] Revert r70874: Dude that just looks kinda ugly --- includes/json/FormatJson.php | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/includes/json/FormatJson.php b/includes/json/FormatJson.php index f33bc6235b..ee9d80083a 100644 --- a/includes/json/FormatJson.php +++ b/includes/json/FormatJson.php @@ -1,24 +1,12 @@ - */ public static function encode( $value, $isHtml = false ) { // Some versions of PHP have a broken json_encode, see PHP bug // 46944. Test encoding an affected character (U+20000) to @@ -31,13 +19,7 @@ class FormatJson { } } - /** - * Decode some JSON into an array or object - * @param $value String of Json - * @param $assoc bool One of AS_OBJECT or AS_ARRAY to specify return type - * @return Array or Object - */ - public static function decode( $value, $assoc = false ) { + public static function decode( $value, $assoc = self::AS_ARRAY ) { if ( !function_exists( 'json_decode' ) ) { $json = new Services_JSON(); $jsonDec = $json->decode( $value ); -- 2.20.1