Ori.livneh has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/178430

Change subject: Fix for fatal caused by static call to MathRenderer::getError
......................................................................

Fix for fatal caused by static call to MathRenderer::getError

MathRenderer::getError() uses $this, so it should not be called statically.
MathInputCheckTexvc should instead call its convertTexvcError method, which
constructs a MathRenderer object so it can call its getError method.

This code is pretty awful. But this way it won't throw fatal errors all the 
time.

Change-Id: Ic438b307a3b464651363b4cc16698c7d4320b253
---
M MathInputCheckTexvc.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Math 
refs/changes/30/178430/1

diff --git a/MathInputCheckTexvc.php b/MathInputCheckTexvc.php
index 419df64..804e52b 100644
--- a/MathInputCheckTexvc.php
+++ b/MathInputCheckTexvc.php
@@ -80,7 +80,7 @@
 
                if ( strlen( $contents ) === 0 ) {
                        wfDebugLog( 'Math', "TeX check output was empty. \n" );
-                       $this->lastError = MathRenderer::getError( 
'math_unknown_error' );
+                       $this->lastError = $this->convertTexvcError( $contents 
);
 
                        return false;
                }

-- 
To view, visit https://gerrit.wikimedia.org/r/178430
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic438b307a3b464651363b4cc16698c7d4320b253
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Math
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to