diff options
author | Umherirrender <umherirrender_de.wp@web.de> | 2020-06-21 22:35:15 +0200 |
---|---|---|
committer | Umherirrender <umherirrender_de.wp@web.de> | 2020-06-21 22:35:15 +0200 |
commit | bff29fc8f431dc5c67bdf40b2b1ac0dc860145a4 (patch) | |
tree | 756dc857ccd06b9c2c45d650bdaccb78daecca0e /includes/password/PasswordFactory.php | |
parent | 733872afda445cc211a5306717aac9f9b9ae26cd (diff) | |
download | mediawikicore-bff29fc8f431dc5c67bdf40b2b1ac0dc860145a4.tar.gz mediawikicore-bff29fc8f431dc5c67bdf40b2b1ac0dc860145a4.zip |
Remove false check from type hinted argument
Type hint includes null and string, not false
Change-Id: I4644255b7cf2e9db940eb2cdedee0f20df0cc130
Diffstat (limited to 'includes/password/PasswordFactory.php')
-rw-r--r-- | includes/password/PasswordFactory.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/includes/password/PasswordFactory.php b/includes/password/PasswordFactory.php index 42af8de75411..3cae9309d731 100644 --- a/includes/password/PasswordFactory.php +++ b/includes/password/PasswordFactory.php @@ -139,7 +139,7 @@ final class PasswordFactory { * @throws PasswordError If hash is invalid or type is not recognized */ public function newFromCiphertext( ?string $hash ) : Password { - if ( $hash === null || $hash === false || $hash === '' ) { + if ( $hash === null || $hash === '' ) { return new InvalidPassword( $this, [ 'type' => '' ], null ); } elseif ( $hash[0] !== ':' ) { throw new PasswordError( 'Invalid hash given' ); |