diff --git a/includes/htmlform/fields/HTMLAutoCompleteSelectField.php b/includes/htmlform/fields/HTMLAutoCompleteSelectField.php index 69521435ba8..8b7d5055e99 100644 --- a/includes/htmlform/fields/HTMLAutoCompleteSelectField.php +++ b/includes/htmlform/fields/HTMLAutoCompleteSelectField.php @@ -95,9 +95,10 @@ class HTMLAutoCompleteSelectField extends HTMLTextField { $validOptions = HTMLFormField::flattenOptions( $this->getOptions() ?: [] ); - if ( in_array( strval( $value ), $validOptions, true ) ) { - return true; - } elseif ( in_array( strval( $value ), $this->autocompleteData, true ) ) { + if ( + in_array( strval( $value ), $validOptions, true ) || + in_array( strval( $value ), $this->autocompleteData, true ) + ) { return true; } elseif ( $this->mParams['require-match'] ) { return $this->msg( 'htmlform-select-badoption' ); diff --git a/includes/parser/BlockLevelPass.php b/includes/parser/BlockLevelPass.php index 0ffd2cdc553..2c9388a929a 100644 --- a/includes/parser/BlockLevelPass.php +++ b/includes/parser/BlockLevelPass.php @@ -598,7 +598,6 @@ class BlockLevelPass { __METHOD__ . ": Invalid input; not enough close tags " . "(level $ltLevel/$lcLevel, state $state)" ); - return false; } return false; } diff --git a/tests/phpunit/includes/OutputPageTest.php b/tests/phpunit/includes/OutputPageTest.php index ef5e1ecd059..4a699f19e55 100644 --- a/tests/phpunit/includes/OutputPageTest.php +++ b/tests/phpunit/includes/OutputPageTest.php @@ -3181,13 +3181,7 @@ class OutputPageTest extends MediaWikiIntegrationTestCase { string $permission, PageIdentity $page ) { - if ( $permission === 'edit' | $permission === 'create' ) { - if ( $page->getDBkey() === 'RelevantTitle' ) { - return true; - } - return false; - } - return false; + return ( $permission === 'edit' || $permission === 'create' ) && $page->getDBkey() === 'RelevantTitle'; } ), 'expectedEditableConfig' => [ 'wgIsProbablyEditable' => false,