From df7c959f5402fc2a237fce81c8aea27c71de2ca6 Mon Sep 17 00:00:00 2001 From: Gregwar Date: Fri, 2 Dec 2011 18:23:08 +0100 Subject: [PATCH] [Validation] Remove session value even if the posted code is valid --- Validator/CaptchaValidator.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); } /**