Closed rkeet closed 5 years ago
@rkeet
In respect, I've assumed that no tests need to be modified
But we need an unit test to cover your scenario.
Created a test case for the scenario. Am tired though, so please check it as well. More another day.
Thanks, @rkeet!
Updated Form class, bindValues function to set to empty array if no data to pass along for baseFieldset
Provide a narrative description of what you are trying to accomplish:
In detail: https://github.com/zendframework/zend-form/issues/215
In short:
Form->bindValues($data, ...)
callsFieldset->bindValues($data, ...)
.Fieldset has the function defined as:
The
$data
var was set with the following line:In the case of no defined
Input
elements, this may cause there to be no key with that name and have the$data
variable benull
. This then causes a fatal error whenForm->bindValues($data, ...)
callsFieldset->bindValues($data, ...)
In respect, I've assumed that no tests need to be modified (they pass btw, though there's 40'ish that don't run because they're for Annotation) as this function was assumed to work with the happy-flow of properly calling the
Fieldset->bindValues()
function. This change just catches a bug but does not modify the intended functionality (I think).