mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-11-24 07:34:22 +00:00
Fix "Call to a member function getIsPreview() on a non-object (NULL)"
Also, the isset() checked was backwards Bug: T116257 Change-Id: I419208bd9ad1a7a758bf9dbe0450020a9f14d39e
This commit is contained in:
parent
8b886471d9
commit
7bbf7c6b68
|
@ -390,12 +390,9 @@ class MathTexvc extends MathRenderer {
|
|||
public function getPng() {
|
||||
global $wgHooks;
|
||||
// Workaround for bugfix for Bug 56769
|
||||
if ( !isset( $wgHooks['ParserAfterParse']['FlushMathBackend'] ) ) {
|
||||
// saves the PNG-file
|
||||
$parser = new Parser();
|
||||
$text = '';
|
||||
$stripState = new StripState( '' );
|
||||
Hooks::run( 'ParserAfterParse', array( &$parser, &$text, &$stripState ) );
|
||||
if ( isset( $wgHooks['ParserAfterParse']['FlushMathBackend'] ) ) {
|
||||
// XXX: save any pending files so the read below works
|
||||
call_user_func( $wgHooks['ParserAfterParse']['FlushMathBackend'] );
|
||||
}
|
||||
$backend = $this->getBackend();
|
||||
return $backend->getFileContents(
|
||||
|
|
Loading…
Reference in a new issue