From 33f9115e43a6223dc734485d8f50150002eed8e8 Mon Sep 17 00:00:00 2001 From: Umherirrender Date: Fri, 31 May 2019 15:15:04 +0200 Subject: [PATCH] Add implode to log message to avoid "array" as text Format it looks like an array [ '...', '...' ] Change-Id: I30122961a65593be0ab264796cd8a57a421c6395 --- src/MathHooks.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/MathHooks.php b/src/MathHooks.php index 82911a8..cc03d1f 100644 --- a/src/MathHooks.php +++ b/src/MathHooks.php @@ -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;