From 274cc4ab77d15f390ed06f62983f995cc0b08079 Mon Sep 17 00:00:00 2001 From: Ed Sanders Date: Tue, 6 Jun 2023 13:35:40 +0100 Subject: [PATCH] Always use the strict equality flag when using in_array Change-Id: Iedd51f31db2bc4e5257d211719f8bdcf1abb09dd --- includes/SyntaxHighlight.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/SyntaxHighlight.php b/includes/SyntaxHighlight.php index dfb4f435..40c4292b 100644 --- a/includes/SyntaxHighlight.php +++ b/includes/SyntaxHighlight.php @@ -101,7 +101,7 @@ class SyntaxHighlight extends ExtensionTagHandler { // a compatible Pygments lexer with a different name. if ( isset( $geshi2pygments[$lexer] ) ) { $lexer = $geshi2pygments[$lexer]; - if ( in_array( $lexer, $lexers ) ) { + if ( in_array( $lexer, $lexers, true ) ) { return $lexer; } } @@ -582,7 +582,7 @@ class SyntaxHighlight extends ExtensionTagHandler { // Parse using the standard parser to get links etc. into the database, HTML is replaced below. // We could do this using $content->fillParserOutput(), but alas it is 'protected'. - if ( in_array( $model, $wgTextModelsToParse ) ) { + if ( in_array( $model, $wgTextModelsToParse, true ) ) { $parserOutput = MediaWikiServices::getInstance()->getParser() ->parse( $text, $title, $options, true, true, $revId ); }