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

Bugfix/merging inputs with allow empty #6330

Merged
merged 2 commits into from
May 28, 2014
Merged

Bugfix/merging inputs with allow empty #6330

merged 2 commits into from
May 28, 2014

Conversation

DASPRiD
Copy link
Member

@DASPRiD DASPRiD commented May 27, 2014

When an input element defines an Input with the required flag set to true, and you add your own Input on top of that with the allow_empty flag set to true, it won't be properly merged into the input of the element. The reason for this is that on merge the setRequired() method is called after the setAllowEmpty() method, which automatically sets allowEmpty to false if the required flag is true. This PR fixes this by simply shifting the method calls in the merge() method around.

@ezimuel ezimuel merged commit fcc1ed9 into zendframework:master May 28, 2014
@ezimuel
Copy link
Contributor

ezimuel commented May 28, 2014

Thanks!

@Ocramius Ocramius added this to the 2.3.2 milestone May 28, 2014
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.

3 participants