[Pkg-mediawiki-devel] Bug#772764: breaks API

Джонатан Вашингтон dzhonw at mail.ru
Mon Dec 15 19:33:22 UTC 2014

This patch also appears to break the API.

The following lines

        if ( preg_match( '/\<\s*cross-domain-policy\s*\>/i',
$json ) ) {
            $json = preg_replace(
'\\u003C$1\\u003E', $json

should be

        if ( preg_match( '/\<\s*cross-domain-policy\s*\>/i', $json ) ) {
            $json = preg_replace(
                '/\<(\s*cross-domain-policy\s*)\>/i', '\\u003C$1\\u003E', $json

Otherwise the API returns 500 errors and the following appears in the error log:
[error] PHP Fatal error: Call-time pass-by-reference has been removed
in /usr/share/mediawiki/includes/api/ApiFormatJson.php on line 77

Fix was identified by the friendly folks in freenode#mediawiki :)


More information about the Pkg-mediawiki-devel mailing list