Issue Type: Docs: Problem Created: 2008-08-22T15:56:29.000+0000 Last Updated: 2008-08-29T08:15:16.000+0000 Status: Resolved Fix version(s): Reporter: Guido Pennella (guidopennella) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend_Captcha
Related issues: - ZF-3970
The demo code in the page http://framework.zend.com/manual/en/… has a bug that makes it not working. As reported in the Zend_Captcha_Adapter interface, the render method must receive a Zend_View to function. Thus the correct code that allows a figlet to be shown is:
$view = new Zend_View(); $captcha = new Zend_Captcha_Figlet(array( 'name' => 'foo', 'wordLen' => 6, 'timeout' => 300,)); $id = $captcha->generate(); echo $captcha->render($view);
Instead of the current
$captcha = new Zend_Captcha_Figlet(array( 'name' => 'foo', 'wordLen' => 6, 'timeout' => 300,)); $id = $captcha->generate(); echo $captcha->render();
Without the prior $view definition and passing it to the renderer, a user will see a blank page (ad wonder what has gone wrong !). I've put in Major priority because even if is a trivial error, block programmers that likes to use demo code as a starting point.
BTW, in the components list there is not yet Zend_Captcha, so I've put it under unknown.
I hope that you are going to correct the doc ASAP.
Posted by Martin Hujer (mhujer) on 2008-08-24T03:35:27.000+0000
It has been already reported.
Posted by Thomas Weidner (thomas) on 2008-08-24T14:48:45.000+0000
Assign the right component
Posted by julien PAULI (doctorrock83) on 2008-08-29T08:15:16.000+0000
r11125 fixes the problem
Have you found an issue?
See the Overview section for more details.