From 2356e933eec275f2f81bdb9ecb014fabe6ca116e Mon Sep 17 00:00:00 2001 From: Qiang Xue Date: Sun, 7 Jul 2013 08:14:38 -0400 Subject: [PATCH] change captcha if it's validated. --- framework/yii/web/CaptchaAction.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/yii/web/CaptchaAction.php b/framework/yii/web/CaptchaAction.php index b149ffd..687ac49 100644 --- a/framework/yii/web/CaptchaAction.php +++ b/framework/yii/web/CaptchaAction.php @@ -177,7 +177,7 @@ class CaptchaAction extends Action $session->open(); $name = $this->getSessionKey() . 'count'; $session[$name] = $session[$name] + 1; - if ($session[$name] > $this->testLimit && $this->testLimit > 0) { + if ($valid || $session[$name] > $this->testLimit && $this->testLimit > 0) { $this->getVerifyCode(true); } return $valid;