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() {
|
public function getPng() {
|
||||||
global $wgHooks;
|
global $wgHooks;
|
||||||
// Workaround for bugfix for Bug 56769
|
// Workaround for bugfix for Bug 56769
|
||||||
if ( !isset( $wgHooks['ParserAfterParse']['FlushMathBackend'] ) ) {
|
if ( isset( $wgHooks['ParserAfterParse']['FlushMathBackend'] ) ) {
|
||||||
// saves the PNG-file
|
// XXX: save any pending files so the read below works
|
||||||
$parser = new Parser();
|
call_user_func( $wgHooks['ParserAfterParse']['FlushMathBackend'] );
|
||||||
$text = '';
|
|
||||||
$stripState = new StripState( '' );
|
|
||||||
Hooks::run( 'ParserAfterParse', array( &$parser, &$text, &$stripState ) );
|
|
||||||
}
|
}
|
||||||
$backend = $this->getBackend();
|
$backend = $this->getBackend();
|
||||||
return $backend->getFileContents(
|
return $backend->getFileContents(
|
||||||
|
|
Loading…
Reference in New Issue