diff --git a/Validator/CaptchaValidator.php b/Validator/CaptchaValidator.php index 49707c9..47945c1 100644 --- a/Validator/CaptchaValidator.php +++ b/Validator/CaptchaValidator.php @@ -38,9 +38,9 @@ class CaptchaValidator implements FormValidatorInterface if (!($code && $excepted_code && is_string($code) && is_string($excepted_code) && $this->niceize($code) == $this->niceize($excepted_code))) { $form->addError(new FormError('Bad code value')); - } else { - $this->session->remove($this->key); } + + $this->session->remove($this->key); } /**