Issues

ZF-6845: setPubkey() and setPrivkey() dont affect Zend_Service_ReCaptcha

Description

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

Strange formatting at the C:\ part fixed

spelling error

I have a possible fix and have contacted Stanislav Malyshev about it.

Resolved in r16099

Ok, appears to be fixed Sorry, I did not know I had to verify the fix :$