Pass arguments to ParserAfterParse by reference

The workaround to save PNG images calls the hook wrong,
the parameters must be passed as references.

Bug: T105598
Change-Id: Ic77aa79aa6e2bf2a9ec00be4cc775d0123bed91a
This commit is contained in:
Bartosz Dziewoński 2015-07-22 14:37:45 +02:00 committed by Physikerwelt
parent 925deaf1d6
commit bc81cdd4b7
1 changed files with 4 additions and 1 deletions

View File

@ -407,7 +407,10 @@ class MathTexvc extends MathRenderer {
// Workaround for bugfix for Bug 56769
if ( !isset( $wgHooks['ParserAfterParse']['FlushMathBackend'] ) ) {
// saves the PNG-file
Hooks::run( 'ParserAfterParse', array( new Parser(), '', new StripState( '' ) ) );
$parser = new Parser();
$text = '';
$stripState = new StripState( '' );
Hooks::run( 'ParserAfterParse', array( &$parser, &$text, &$stripState ) );
}
$backend = $this->getBackend();
return $backend->getFileContents( array( 'src' => $this->getHashPath() . "/" . $this->getHash() . '.png' ) );