]> scripts.mit.edu Git - autoinstallsdev/mediawiki.git/blobdiff - includes/api/ApiFormatJson.php
MediaWiki 1.15.0
[autoinstallsdev/mediawiki.git] / includes / api / ApiFormatJson.php
index 1d89eb186ebaed174f460f55588c87215b5d00e7..7b5a02a499af6d6b69bbdb13299429530b89ee36 100644 (file)
@@ -61,7 +61,7 @@ class ApiFormatJson extends ApiFormatBase {
                // 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') || $this->getIsHtml() || strtolower(json_encode("\xf0\xa0\x80\x80")) != '\ud840\udc00') {
+               if (!function_exists('json_encode') || $this->getIsHtml() || strtolower(json_encode("\xf0\xa0\x80\x80")) != '"\ud840\udc00"') {
                        $json = new Services_JSON();
                        $this->printText($prefix . $json->encode($this->getResultData(), $this->getIsHtml()) . $suffix);
                } else {
@@ -89,6 +89,6 @@ class ApiFormatJson extends ApiFormatBase {
        }
 
        public function getVersion() {
-               return __CLASS__ . ': $Id: ApiFormatJson.php 45682 2009-01-12 19:06:33Z raymond $';
+               return __CLASS__ . ': $Id: ApiFormatJson.php 48713 2009-03-23 19:58:07Z catrope $';
        }
 }