Add implode to log message to avoid "array" as text

Format it looks like an array [ '...', '...' ]

Change-Id: I30122961a65593be0ab264796cd8a57a421c6395
This commit is contained in:
Umherirrender 2019-05-31 15:15:04 +02:00
parent 0ccfd44b81
commit 33f9115e43
1 changed files with 3 additions and 3 deletions

View File

@ -268,12 +268,12 @@ class MathHooks {
// If the default option is not in the valid options the
// user interface throws an exception (BUG 64844)
$mode = self::mathModeToString( $wgDefaultUserOptions['math'] );
if ( !in_array( $mode, MathRenderer::getValidModes() ) ) {
$validModes = MathRenderer::getValidModes();
if ( !in_array( $mode, $validModes ) ) {
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." );
// Display the checkbox in the first option.
$validModes = MathRenderer::getValidModes();
$wgDefaultUserOptions['math'] = $validModes[0];
}
return true;