Browse Source

fixes issue ZF-5358. allow for custom captcha elements that rely on setOptions being called first.

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@18639 44c647ce-9c0f-0410-b52a-842ac1e357ba
klassicd 16 years ago
parent
commit
4cbe1860a6
1 changed files with 2 additions and 1 deletions
  1. 2 1
      library/Zend/Form/Element/Captcha.php

+ 2 - 1
library/Zend/Form/Element/Captcha.php

@@ -154,6 +154,7 @@ class Zend_Form_Element_Captcha extends Zend_Form_Element_Xhtml
      */
     public function setOptions(array $options)
     {
+    	parent::setOptions($options);
         if (array_key_exists('captcha', $options)) {
             if (array_key_exists('captchaOptions', $options)) {
                 $this->setCaptcha($options['captcha'], $options['captchaOptions']);
@@ -163,7 +164,7 @@ class Zend_Form_Element_Captcha extends Zend_Form_Element_Xhtml
             }
             unset($options['captcha']);
         }
-        return parent::setOptions($options);
+        return $this;
     }
 
     /**