From 5b69b2380c958d345280be768a7c200ecc913f99 Mon Sep 17 00:00:00 2001 From: Ed Sanders Date: Tue, 6 Jun 2023 13:37:54 +0100 Subject: [PATCH] Always use the strict equality flag when using in_array Change-Id: Ieb7dc53cbd5b45b6064e05fe5df0401918bbb36d --- includes/Hooks.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/Hooks.php b/includes/Hooks.php index 401c2456..db5f671b 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -38,14 +38,14 @@ class Hooks implements private function isCodeMirrorOnPage( OutputPage $out ) { // Disable CodeMirror when CodeEditor is active on this page // Depends on ext.codeEditor being added by \MediaWiki\EditPage\EditPage::showEditForm:initial - if ( in_array( 'ext.codeEditor', $out->getModules() ) ) { + if ( in_array( 'ext.codeEditor', $out->getModules(), true ) ) { return false; } // Disable CodeMirror when the WikiEditor toolbar is not enabled in preferences if ( !$this->userOptionsLookup->getOption( $out->getUser(), 'usebetatoolbar' ) ) { return false; } - return in_array( $out->getActionName(), [ 'edit', 'submit' ] ) && + return in_array( $out->getActionName(), [ 'edit', 'submit' ], true ) && // CodeMirror on textarea wikitext editors doesn't support RTL (T170001) !$out->getTitle()->getPageLanguage()->isRTL(); }