zendframework/zf2 — pull request #6330 by DASPRiD (2014-05-27 10:22:09+00:00)
Title: Bugfix/merging inputs with allow empty

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.