zendframework / zend-inputfilter

InputFilter component from Zend Framework
BSD 3-Clause "New" or "Revised" License
64 stars 50 forks source link

BaseInputFilter::populate() calls resetValue() for missing arrayinputs #72

Closed BreiteSeite closed 8 years ago

BreiteSeite commented 8 years ago

hasValue returns true for ArrayInputs whether or not a value was provided via InputFilter::setData(). This can't be the expected behavior of this function.

However, i had to refactor the existing test BaseInputFilterTest::testPopulateSupportsArrayInputEvenIfDataMissing. I don't know the implications regarding BC because neither the docblock nor the commit message provided a useful use-case for this test-method.

Feedback is very welcome.

Thank you for considering my pull request.

Maks3w commented 8 years ago

Merged for next bugfix release. I don't consider this need to be backported to LTS

/cc @weierophinney