Browse files

fix #3144

  • Loading branch information...
1 parent 421a544 commit 283b6365d985765e283c5ba42b0201a1a78f0048 @stefanotorresi stefanotorresi committed Dec 3, 2012
Showing with 8 additions and 4 deletions.
  1. +8 −4 library/Zend/Form/View/Helper/Captcha/AbstractWord.php
View
12 library/Zend/Form/View/Helper/Captcha/AbstractWord.php
@@ -118,7 +118,6 @@ protected function renderCaptchaInputs(ElementInterface $element)
));
}
- $attributes = $element->getAttributes();
$captcha = $element->getCaptcha();
if ($captcha === null || !$captcha instanceof CaptchaAdapter) {
@@ -127,9 +126,14 @@ protected function renderCaptchaInputs(ElementInterface $element)
__METHOD__
));
}
-
- $hidden = $this->renderCaptchaHidden($captcha, $attributes);
- $input = $this->renderCaptchaInput($captcha, $attributes);
+
+
+ $inputAttributes = $element->getAttributes();
+ $hiddenAttributes = $inputAttributes;
+ unset($hiddenAttributes['id']);
+
+ $hidden = $this->renderCaptchaHidden($captcha, $hiddenAttributes);
+ $input = $this->renderCaptchaInput($captcha, $inputAttributes);
return $hidden . $input;
}

0 comments on commit 283b636

Please sign in to comment.