Issues

ZF-8094: Captcha element always set captcha decorator

Issue Type: Bug Created: 2009-10-18T13:17:02.000+0000 Last Updated: 2012-05-11T15:56:38.000+0000 Status: Closed Fix version(s): Reporter: Kim Blomqvist (kblomqvist) Assignee: Frank Br├╝ckner (frosch) Tags: - Zend_Form

Related issues: - ZF-11609

Attachments:

Description

Captcha element will always set captcha decorator as a default and doesn't bother the value of $_disableLoadDefaultDecorators.

<pre class="highlight">
    public function render(Zend_View_Interface $view = null)
    {
        $captcha    = $this->getCaptcha();
        $captcha->setName($this->getFullyQualifiedName());

        $decorators = $this->getDecorators();

        $decorator  = $captcha->getDecorator();
        if (!empty($decorator)) {
            array_unshift($decorators, $decorator);
        }

-->     $decorator = array('Captcha', array('captcha' => $captcha));
        array_unshift($decorators, $decorator);

        $this->setDecorators($decorators);

        $this->setValue($this->getCaptcha()->generate());

        return parent::render($view);
    }

Comments

No comments to display

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts