Replace isset() with null check in SimpleCaptcha

Found usage of isset() on expression $this->captchaSolved that appears
to be always set. isset() should only be used to suppress errors. Check
whether the expression is null instead.
See https://www.mediawiki.org/wiki/Manual:Coding_conventions/PHP#isset

Change-Id: I5520786060b2aa2fca81acd40924d84e94e8dff2
This commit is contained in:
Umherirrender 2024-04-01 13:38:44 +02:00
parent 5c1fc0f2e0
commit b2ec6b2955

View file

@ -985,7 +985,7 @@ class SimpleCaptcha {
protected function passCaptcha( $index, $word ) { protected function passCaptcha( $index, $word ) {
// Don't check the same CAPTCHA twice in one session, // Don't check the same CAPTCHA twice in one session,
// if the CAPTCHA was already checked - Bug T94276 // if the CAPTCHA was already checked - Bug T94276
if ( isset( $this->captchaSolved ) ) { if ( $this->captchaSolved !== null ) {
return $this->captchaSolved; return $this->captchaSolved;
} }