From de185ca16f1a39ed3b1fefa0685d1714a94aaebd Mon Sep 17 00:00:00 2001 From: Reedy Date: Sun, 12 Aug 2012 21:11:34 +0100 Subject: [PATCH] Remove workaround hack for php bug 46944 https://bugs.php.net/bug.php?id=46944 Fixed for 5.3.0, and as we require >= 5.3.2, workaround is redundant http://php.net/ChangeLog-5.php Change-Id: I567466c0c747dba2f903e9258d0f06f725cefb8f --- includes/json/FormatJson.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/includes/json/FormatJson.php b/includes/json/FormatJson.php index d3cc55011a..bbcc1856bd 100644 --- a/includes/json/FormatJson.php +++ b/includes/json/FormatJson.php @@ -41,10 +41,7 @@ class FormatJson { * @return string */ 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 - // avoid this. - if ( !function_exists( 'json_encode' ) || $isHtml || strtolower( json_encode( "\xf0\xa0\x80\x80" ) ) != '"\ud840\udc00"' ) { + if ( !function_exists( 'json_encode' ) || $isHtml ) { $json = new Services_JSON(); return $json->encode( $value, $isHtml ); } else { -- 2.20.1