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
This commit is contained in:
Ori Livneh 2014-12-08 20:36:29 -08:00
parent 24264588ce
commit 8477a17a09
1 changed files with 1 additions and 1 deletions

View File

@ -80,7 +80,7 @@ class MathInputCheckTexvc extends MathInputCheck {
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;
}