Author: drkludge
Description:
I was modifying the calc extension to see how to make a mediawiki extension. I
followed the doc right above the function
http://meta.wikimedia.org/wiki/Extending_wiki_markup#Installing_the_extension
link. I added the new parser variable using &$parser as per the FAQ here
http://meta.wikimedia.org/wiki/MediaWiki_extensions_FAQ#How_do_I_render_wikitext_in_my_extension.3F
The new function call looks like this
function doMath( $input, $argv, &$refParser158 ) {
}
The suggested function call of
$calc_data = $refParser158->parse($input, false);
Produces
[Tue Jun 06 18:56:12 2006] [error] [client 127.0.0.1] PHP Fatal error:
Cannot pass parameter 2 by reference in
/var/www/mediawiki16/extensions/calc/calc.php on line 79, referer:
http://localhost/mediawiki16/index.php?title=Main_Page&action=edit§ion=3
in the /var/log/httpd/error_log and I thick the page did not render.
The work around is to use existing pre 1.5.8 setup and call.
global $wgOut;
....
$calc_data = $wgOut->parse($input, false);
I see 1.6.7 just came out so I do not know if it solves the problem. google and
media wiki searches did not return any hits but that's not the easiest error
message to query for.
Version info.
- MediaWiki: 1.6.6
- PHP: 5.1.2 (apache2handler)
- MySQL: 5.0.21
- Fedora Core 5.
Version: unspecified
Severity: normal
OS: Linux
Platform: PC
URL: http://meta.wikimedia.org/wiki/Extending_wiki_markup#Installing_the_extension