If I use this in a class
$captcha = new Zend_Captcha_ReCaptcha();
$captcha->setPrivkey(self::CAPTCHA_PRIVATE_KEY)
->setPubkey(self::CAPTHCA_PUBLIC_KEY);
the Zend_Service_ReCaptcha opbject created by the constructor isn't updated. This results in an PHP error later on at rendering, which is done by the Zend Service
'Exception caught by form: Missing public key
Stack Trace:
0 C:\Program Files\Zend\Apache2\library\Zend\Captcha\ReCaptcha.php(265): Zend_Service_ReCaptcha->getHtml()
1 C:\Program Files\Zend\Apache2\library\Zend\Form\Decorator\Captcha.php(61): Zend_Captcha_ReCaptcha->render(Object(Zend_View), Object(Zend_Form_Element_Captcha)
2 C:\Program Files\Zend\Apache2\library\Zend\Form\Element.php(1911): Zend_Form_Decorator_Captcha->render(\'\')
3 C:\Program Files\Zend\Apache2\library\Zend\Form\Element\Captcha.php(175): Zend_Form_Element->render(NULL)
4 C:\Program Files\Zend\Apache2\library\Zend\Form\Decorator\FormElements.php(101): Zend_Form_Element_Captcha->render()
5 C:\Program Files\Zend\Apache2\library\Zend\Form.php(2595): Zend_Form_Decorator_FormElements->render(\'\')
6 C:\Program Files\Zend\Apache2\library\Zend\Form.php(2610): Zend_Form->render()
Comments
Posted by Thom (theguyofdoom) on 2009-05-28T07:28:47.000+0000
Strange formatting at the C:\ part fixed
Posted by Thom (theguyofdoom) on 2009-05-30T11:43:10.000+0000
spelling error
Posted by Christer Edvartsen (cogo) on 2009-06-15T06:40:08.000+0000
I have a possible fix and have contacted Stanislav Malyshev about it.
Posted by Christer Edvartsen (cogo) on 2009-06-17T01:54:35.000+0000
Resolved in r16099
Posted by Thom (theguyofdoom) on 2010-01-23T06:59:38.000+0000
Ok, appears to be fixed Sorry, I did not know I had to verify the fix :$