diff --git a/framework/captcha/CaptchaAction.php b/framework/captcha/CaptchaAction.php index 439994ed11..93b1dcb604 100644 --- a/framework/captcha/CaptchaAction.php +++ b/framework/captcha/CaptchaAction.php @@ -184,7 +184,7 @@ class CaptchaAction extends Action $session = Yii::$app->getSession(); $session->open(); $name = $this->getSessionKey() . 'count'; - ++$session[$name]; + $session[$name] = $session[$name] + 1; if ($valid || $session[$name] > $this->testLimit && $this->testLimit > 0) { $this->getVerifyCode(true); }