From fb2fa8634d7ea400ea5c2673d708884e05ca07f4 Mon Sep 17 00:00:00 2001 From: Alexander Makarov Date: Sat, 10 Oct 2015 18:17:27 +0300 Subject: [PATCH 1/2] Fixes #9877 --- framework/captcha/CaptchaAction.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/captcha/CaptchaAction.php b/framework/captcha/CaptchaAction.php index 439994ed11..419e4000ee 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); } @@ -192,7 +192,7 @@ class CaptchaAction extends Action return $valid; } - /** + /**\ * Generates a new verification code. * @return string the generated verification code */ From 3f4fcbe569e3460ad7b28085b957c3b2f47b5334 Mon Sep 17 00:00:00 2001 From: Alexander Makarov Date: Sat, 10 Oct 2015 20:53:23 +0300 Subject: [PATCH 2/2] Removed accidentally typed char --- framework/captcha/CaptchaAction.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/captcha/CaptchaAction.php b/framework/captcha/CaptchaAction.php index 419e4000ee..93b1dcb604 100644 --- a/framework/captcha/CaptchaAction.php +++ b/framework/captcha/CaptchaAction.php @@ -192,7 +192,7 @@ class CaptchaAction extends Action return $valid; } - /**\ + /** * Generates a new verification code. * @return string the generated verification code */