From 270c5364a5b3ed73fa7ecb8f75f52e322a212ea6 Mon Sep 17 00:00:00 2001 From: cubercsl <2014cais01@gmail.com> Date: Mon, 4 Jul 2022 21:32:38 +0800 Subject: [PATCH] fix: addModules with array argument Use of ParserOutput::addModules with non-array argument was deprecated in MediaWiki 1.38. fix #37 --- SimpleMathJaxHooks.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SimpleMathJaxHooks.php b/SimpleMathJaxHooks.php index c45fdd2a..b715c6bc 100644 --- a/SimpleMathJaxHooks.php +++ b/SimpleMathJaxHooks.php @@ -13,8 +13,8 @@ class SimpleMathJaxHooks { $wgOut->addJsConfigVars( 'wgSmjScale', $wgSmjScale ); $wgOut->addJsConfigVars( 'wgSmjEnableMenu', $wgSmjEnableMenu ); $wgOut->addJsConfigVars( 'wgSmjDisplayAlign', $wgSmjDisplayAlign ); - $wgOut->addModules( 'ext.SimpleMathJax' ); - $wgOut->addModules( 'ext.SimpleMathJax.mobile' ); // For MobileFrontend + $wgOut->addModules( [ 'ext.SimpleMathJax' ] ); + $wgOut->addModules( [ 'ext.SimpleMathJax.mobile' ] ); // For MobileFrontend $parser->setHook( 'math', __CLASS__ . '::renderMath' ); if( $wgSmjUseChem ) $parser->setHook( 'chem', __CLASS__ . '::renderChem' ); }