ZF-8938: Zend_Form does not return correct values with subforms named '0'

Issue Type: Sub-task Created: 2010-01-26T09:08:13.000+0000 Last Updated: 2010-04-16T13:21:39.000+0000 Status: Resolved Fix version(s): Reporter: Andy Fowler (andyfowler) Assignee: Christian Albrecht (alab) Tags: - Zend_Form

Related issues: - ZF-7015

Attachments: - 0001-Fixes-ZF-8938-zero-named-forms.patch


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.


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

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.