Zend\Form\Captcha setOptions don't follow interface contract #3446

Closed
Maks3w opened this Issue Jan 16, 2013 · 2 comments

Comments

Projects
None yet
2 participants
@Maks3w
Member

Maks3w commented Jan 16, 2013

The argument of setOptions can be either array or Traversable but the way of access to to captcha option only works for arrays

public function setOptions($options)
    {
        parent::setOptions($options);

        if (isset($options['captcha'])) {
            $this->setCaptcha($options['captcha']);
        }

        return $this;
    }
@Maks3w

This comment has been minimized.

Show comment Hide comment
@Maks3w

Maks3w Jan 16, 2013

Member

See #3437 for a example about how to do this

Member

Maks3w commented Jan 16, 2013

See #3437 for a example about how to do this

danizord added a commit to danizord/zf2 that referenced this issue Jan 17, 2013

@weierophinney

This comment has been minimized.

Show comment Hide comment
@weierophinney

weierophinney Jan 18, 2013

Owner

@danizord Looks reasonable; add a unit test, and I'll pull this.

Owner

weierophinney commented Jan 18, 2013

@danizord Looks reasonable; add a unit test, and I'll pull this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment