summaryrefslogtreecommitdiff
path: root/includes/json/FormatJson.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2011-12-03 13:29:22 +0100
committerPierre Schmitz <pierre@archlinux.de>2011-12-03 13:29:22 +0100
commitca32f08966f1b51fcb19460f0996bb0c4048e6fe (patch)
treeec04cc15b867bc21eedca904cea9af0254531a11 /includes/json/FormatJson.php
parenta22fbfc60f36f5f7ee10d5ae6fe347340c2ee67c (diff)
Update to MediaWiki 1.18.0
* also update ArchLinux skin to chagnes in MonoBook * Use only css to hide our menu bar when printing
Diffstat (limited to 'includes/json/FormatJson.php')
-rw-r--r--includes/json/FormatJson.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/includes/json/FormatJson.php b/includes/json/FormatJson.php
index b7049aeb..006f7720 100644
--- a/includes/json/FormatJson.php
+++ b/includes/json/FormatJson.php
@@ -18,6 +18,11 @@ class FormatJson {
*
* @param $value Mixed: the value being encoded. Can be any type except a resource.
* @param $isHtml Boolean
+ *
+ * @todo FIXME: "$isHtml" parameter's purpose is not documented. It appears to
+ * map to a parameter labeled "pretty-print output with indents and
+ * newlines" in Services_JSON::encode(), which has no string relation
+ * to HTML output.
*
* @return string
*/
@@ -25,7 +30,7 @@ class FormatJson {
// 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 || strtolower( json_encode( "\xf0\xa0\x80\x80" ) ) != '"\ud840\udc00"' ) {
$json = new Services_JSON();
return $json->encode( $value, $isHtml );
} else {