r65901 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r65900‎ | r65901 | r65902 >
Date:15:29, 4 May 2010
Author:platonides
Status:ok
Tags:
Comment:
json_decode -> FormatJson::decode
Modified paths:
  • /trunk/phase3/includes/json/FormatJson.php (modified) (history)
  • /trunk/phase3/maintenance/parserTests.inc (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/parserTests.inc
@@ -1541,7 +1541,7 @@
15421542 print "CodeReview info upload failed to reach server.\n";
15431543 exit( 1 );
15441544 }
1545 - $responseData = json_decode( $response, true );
 1545+ $responseData = FormatJson::decode( $response, true );
15461546 if( !is_array( $responseData ) ) {
15471547 print "CodeReview API response not recognized...\n";
15481548 wfDebug( "Unrecognized CodeReview API response: $response\n" );
Index: trunk/phase3/includes/json/FormatJson.php
@@ -6,7 +6,7 @@
77 die( 1 );
88 }
99
10 -class FormatJson{
 10+class FormatJson {
1111 public static function encode($value, $isHtml=false){
1212 // Some versions of PHP have a broken json_encode, see PHP bug
1313 // 46944. Test encoding an affected character (U+20000) to

Status & tagging log