[MediaWiki-l] PHP-error from code of master-source?

Bartosz Dziewoński matma.rex at gmail.com
Tue Oct 21 16:06:53 UTC 2014


I don't entirely understand your problem.

On master, this part of code reads:

		$url = preg_replace_callback( '/[\][<>"\\x00-\\x20\\x7F\|]/',
			array( __CLASS__, 'cleanUrlCallback' ), $url );

And Sanitizer::cleanUrlCallback most definitely is a valid function,  
defined a few lines below:

	static function cleanUrlCallback( $matches ) {
		return urlencode( $matches[0] );
	}

If you patches that part of code in older MediaWiki with the version from  
master, you must also copy the function for it to have a chance of  
working. This code was last touched in 2011:  
http://mediawiki.org/wiki/Special:Code/MediaWiki/85421


-- 
Bartosz Dziewoński



More information about the MediaWiki-l mailing list