mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-11-28 09:20:42 +00:00
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:
parent
925deaf1d6
commit
bc81cdd4b7
|
@ -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' ) );
|
||||
|
|
Loading…
Reference in a new issue