Add implode to log message to avoid "array" as text
Format it looks like an array [ '...', '...' ] Change-Id: I30122961a65593be0ab264796cd8a57a421c6395
This commit is contained in:
parent
0ccfd44b81
commit
33f9115e43
|
@ -268,12 +268,12 @@ class MathHooks {
|
||||||
// If the default option is not in the valid options the
|
// If the default option is not in the valid options the
|
||||||
// user interface throws an exception (BUG 64844)
|
// user interface throws an exception (BUG 64844)
|
||||||
$mode = self::mathModeToString( $wgDefaultUserOptions['math'] );
|
$mode = self::mathModeToString( $wgDefaultUserOptions['math'] );
|
||||||
if ( !in_array( $mode, MathRenderer::getValidModes() ) ) {
|
$validModes = MathRenderer::getValidModes();
|
||||||
|
if ( !in_array( $mode, $validModes ) ) {
|
||||||
LoggerFactory::getInstance( 'Math' )->error( 'Misconfiguration: ' .
|
LoggerFactory::getInstance( 'Math' )->error( 'Misconfiguration: ' .
|
||||||
"\$wgDefaultUserOptions['math'] is not in " . MathRenderer::getValidModes() . ".\n" .
|
"\$wgDefaultUserOptions['math'] is not in [ " . implode( ', ', $validModes ) . " ].\n" .
|
||||||
"Please check your LocalSetting.php file." );
|
"Please check your LocalSetting.php file." );
|
||||||
// Display the checkbox in the first option.
|
// Display the checkbox in the first option.
|
||||||
$validModes = MathRenderer::getValidModes();
|
|
||||||
$wgDefaultUserOptions['math'] = $validModes[0];
|
$wgDefaultUserOptions['math'] = $validModes[0];
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue