From 52af61330f86e6ff26983f0f50ea5cf995f189da Mon Sep 17 00:00:00 2001 From: Umherirrender Date: Sat, 23 Mar 2024 00:59:35 +0100 Subject: [PATCH] Add explicit parentheses around mixed boolean operator Mixing different binary boolean operators within an expression without using parentheses to clarify precedence is not allowed (T358966) Change-Id: I6d3edc5f8dddcfc6bd6a7d2a8f2ad9467372908d --- includes/Engines/LuaCommon/UstringLibrary.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/Engines/LuaCommon/UstringLibrary.php b/includes/Engines/LuaCommon/UstringLibrary.php index 5719b217..79bb5fb2 100644 --- a/includes/Engines/LuaCommon/UstringLibrary.php +++ b/includes/Engines/LuaCommon/UstringLibrary.php @@ -897,7 +897,7 @@ class UstringLibrary extends LibraryBase { $realCallback = $cb; $cb = static function ( $m ) use ( $realCallback, &$skippedMatches, &$maxMatches ) { $c = ord( $m['phpBug53823'] ); - if ( $c >= 0x80 && $c <= 0xbf || $maxMatches <= 0 ) { + if ( ( $c >= 0x80 && $c <= 0xbf ) || $maxMatches <= 0 ) { $skippedMatches++; return $m[0]; } else {