zendframework / zend-inputfilter

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

Ensures that `null` data passed to an input filter is cast to an empty array #161

Closed weierophinney closed 6 years ago

weierophinney commented 6 years ago

Per #159, BaseInputFilter works inconsistently when a null value is passed to setData(), interpreting this as an invalid argument type versus an empty data set. This is particularly problematic with nested sets sent via an API, as they may be nullable. In such cases, they should be treated the same as if an empty array were provided.

Fixes #159.