ZF-8938: Zend_Form does not return correct values with subforms named '0'
Description
Zend_Form::setName() allows subforms to be named '0' and even explicitly checks them with (empty() || === '0'). Zend_Form::getElementsBelongTo() uses getName() with empty() but does not check if name === '0'.
The result is data corruption in Zend_Form::getValues() because it uses getElementsBelongTo() for all subForms.
Comments
Posted by Andy Fowler (andyfowler) on 2010-01-26T09:10:57.000+0000
Fix, including unit test.
Posted by Andy Fowler (andyfowler) on 2010-01-28T06:43:06.000+0000
Adding additional patch which fixes error scrambling in forms with all-numeric names.
Posted by Christian Albrecht (alab) on 2010-03-04T08:53:14.000+0000
This patch is a Conclusion of the both patches but uses lesser function calls, no Unit Test included.
Posted by Christian Albrecht (alab) on 2010-03-18T08:29:04.000+0000
Fixed in [ZF-9401]
Posted by Christian Albrecht (alab) on 2010-03-25T13:24:01.000+0000
Reopened because suggested fix is not reviewed and committed yet.
Posted by Christian Albrecht (alab) on 2010-04-16T13:21:39.000+0000
Fixed in parent ZF-9401