Merge "Fix: Special page ShowMathImage should read the mode as string"
This commit is contained in:
commit
7388292cab
|
@ -49,7 +49,7 @@ class SpecialMathShowImage extends SpecialPage {
|
|||
} else {
|
||||
$asciimath = '';
|
||||
}
|
||||
$this->mode = $request->getInt( 'mode', 'mathml' );
|
||||
$this->mode = MathHooks::mathModeToString( $request->getText( 'mode' ), 'mathml' );
|
||||
if ( !in_array( $this->mode, MathRenderer::getValidModes() ) ) {
|
||||
// Fallback to the default if an invalid mode was specified
|
||||
$this->mode = 'mathml';
|
||||
|
@ -116,7 +116,7 @@ class SpecialMathShowImage extends SpecialPage {
|
|||
/**
|
||||
* Prints the specified error message as svg.
|
||||
* @param string $msg error message
|
||||
* @return xml svg image with the error message
|
||||
* @return string xml svg image with the error message
|
||||
*/
|
||||
private function printSvgError( $msg ) {
|
||||
global $wgDebugComments;
|
||||
|
|
Loading…
Reference in New Issue