More compact number operations

This commit is contained in:
Alexander Makarov
2015-10-10 00:41:54 +03:00
parent b65bfad44d
commit 4ecafe653c
3 changed files with 4 additions and 4 deletions

View File

@ -184,7 +184,7 @@ class CaptchaAction extends Action
$session = Yii::$app->getSession();
$session->open();
$name = $this->getSessionKey() . 'count';
$session[$name] = $session[$name] + 1;
$session[$name] += 1;
if ($valid || $session[$name] > $this->testLimit && $this->testLimit > 0) {
$this->getVerifyCode(true);
}