I have a bug report for a user of my Google Wave extension:
http://www.mediawiki.org/wiki/Extension:GoogleWave
http://code.google.com/p/micke/source/browse/GoogleWave/GoogleWave.php (source)
It seems Parser.php sends the parser object to my function as a value($parser) rather than as a reference (&$parser):
[Tue Oct 06 16:57:53 2009] [error] [client x.x.x.x.] PHP Warning: Parameter 3 to waveRender() expected to be a reference, value given in C:\Apache2.2\htdocs\mediawiki\includes\parser\Parser.php on line 3243, referer: ...
Why is this? I don't get an error like this in any of my test installations (although I have never tried it in a Windows environment). Googleing gives me nothing...
My questions are these: Why does this happen? Is it something with the version of PHP?
What are the benefits in my case of wanting the parser object as a reference instead of a value? That is, should I do: function waveRender($input, $argv, $parser)
rather than: function waveRender($input, $argv, &$parser)
I just set it up the way I did after reading the docs on http://mediawiki.org where it alwas seems to be passed by reference.
The users bug report can be found here btw: http://groups.google.com/group/google-wave-api/browse_thread/thread/85971370... /five messages down)