X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fjson%2FFormatJson.php;h=775ab43c981000238d9a3e1a96580cecf942441d;hb=b8c26af5625eafb30ca26d3ef07dca1b619ceaeb;hp=285f1ec31d8c03d0bb212c37d68d67537860132b;hpb=f30a7f34e7872839d813dfd2282dbce51bbd4669;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/json/FormatJson.php b/includes/json/FormatJson.php index 285f1ec31d..775ab43c98 100644 --- a/includes/json/FormatJson.php +++ b/includes/json/FormatJson.php @@ -94,18 +94,18 @@ class FormatJson { * @note These are listed in ECMA-262 (5.1 Ed.), §7.3 Line Terminators along with U+000A (LF) * and U+000D (CR). However, PHP already escapes LF and CR according to RFC 4627. */ - private static $badChars = array( + private static $badChars = [ "\xe2\x80\xa8", // U+2028 LINE SEPARATOR "\xe2\x80\xa9", // U+2029 PARAGRAPH SEPARATOR - ); + ]; /** * Escape sequences for characters listed in FormatJson::$badChars. */ - private static $badCharsEscaped = array( + private static $badCharsEscaped = [ '\u2028', // U+2028 LINE SEPARATOR '\u2029', // U+2029 PARAGRAPH SEPARATOR - ); + ]; /** * Returns the JSON representation of a value. @@ -131,7 +131,7 @@ class FormatJson { static $bug66021; if ( $pretty !== false && $bug66021 === null ) { - $bug66021 = json_encode( array(), JSON_PRETTY_PRINT ) !== '[]'; + $bug66021 = json_encode( [], JSON_PRETTY_PRINT ) !== '[]'; } // PHP escapes '/' to prevent breaking out of inline script blocks using '',