Last modified: 2006-06-07 08:02:51 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T8228, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 6228 - The 1.5.8+ parser function generates an error on the 1.6.6 release.
The 1.5.8+ parser function generates an error on the 1.6.6 release.
Status: RESOLVED INVALID
Product: MediaWiki extensions
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
PC Linux
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
http://meta.wikimedia.org/wiki/Extend...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-06-07 07:17 UTC by Greg Morgan
Modified: 2006-06-07 08:02 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Greg Morgan 2006-06-07 07:17:58 UTC
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&section=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.
Comment 1 Brion Vibber 2006-06-07 08:02:51 UTC
Please see the code of existing extensions for examples that actually work.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links