Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Fix for #6263 (replaces PR #6518) #6880

Closed
wants to merge 4 commits into from

Conversation

adamlundrigan
Copy link
Contributor

Issue summary

Elements of type Zend\Form\ElementInterface cannot be added directly to a Collection object due to the latter's setting of an object prototype on the supplied element, which is only defined on Zend\Form\FieldsetInterface.

Fix

Handle Zend\Form\ElementInterface instances separately; call setValue instead of setObject.

Ack

Fix and reproducing code snippet contributed by @SteveTalbot

@adamlundrigan
Copy link
Contributor Author

IMO Collection shouldn't accept ElementInterface at all...restricting Collections to containing only FieldsetInterface simplifies the populate and extract logic. But that's a discussion for ZF3.

@Ocramius Ocramius added this to the 2.3.4 milestone Nov 19, 2014
@Ocramius Ocramius self-assigned this Nov 19, 2014
Ocramius added a commit that referenced this pull request Nov 19, 2014
…nto develop

Close #6880
Close #6518
Close #6263
Forward port #6880
Forward port #6518
Forward port #6263
@Ocramius Ocramius closed this in e86512c Nov 19, 2014
@Ocramius
Copy link
Member

@adamlundrigan manually merged:

master: e86512c
develop: f7ecf45

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants