Closed orporan closed 9 years ago
It was introduced with 2.5.2, via 3575ece fixing #7.
$this->data
is guaranteed to be iterable, but may, as you note, not be an actual array. As such, there are two paths forward:
array
typehint from the $data
argument.$data
argument to an array via iterator_to_array()
prior to calling validateInputs()
.I think the first would be simpler, and will get a patch out today, likely with an updated 2.5 tag immediately, and an LTS release early next week.
I've labelled as "BC Break" to indicate that the bug is drawing attention to an existing BC Break. The patch that I've now attached to this issue fixes it.
Will release with versions 2.4.7 (LTS compatibility) and 2.5.4 (5.5+ compat).
This issue was introduced between version 2.5.1 and 2.5.3, i've switched back and forth between the two versions and I keep getting this error with 2.5.3 but not with 2.5.1 this happens when i try to validate a simple post data
Catchable fatal error: Argument 2 passed to Zend\InputFilter\BaseInputFilter::validateInputs() must be of the type array, object given, called in C:\crazylister\vendor\zendframework\zend-inputfilter\src\BaseInputFilter.php on line 221 and defined in C:\crazylister\vendor\zendframework\zend-inputfilter\src\BaseInputFilter.php on line 232