ZF-10281: Zend_Form removes 0 (zero) from the elements index
Description
Zend_Form should not remove the value 0 (zero) from the elements index of subforms.
When I try to create a subform with the following structure:
Zend_Form removes the 0 (zero) from the attributes, thus leaving:
This is bad because some developers use the elements index to map objects to save in the database (e.g. Doctrine).
Comments
Posted by Piotr Mlocek (pimlock) on 2010-08-12T06:05:46.000+0000
I couldn't reproduce this behaviour. Could you paste code you are using?
I've tried this example code
and it creates this result
which is what you expect.
Posted by Daniel Lima (yourwebmaker) on 2010-08-13T13:51:13.000+0000
Sorry for the delay to response your comment
Follow the code:
Posted by Piotr Mlocek (pimlock) on 2010-08-16T04:58:32.000+0000
Hmm.. Unfortunatelly I still can't reproduce this behovior :). The code you've provided is producing following html (I'm using ZF 1.10.7):
So it seems correct.
Here is code I've used to check this: [http://pastie.org/1095403].
Posted by Daniel Lima (yourwebmaker) on 2010-08-16T11:25:47.000+0000
Men.... you're right! My working copy of ZF is 1.10.6
I related as a 1.10.7 version.
Im so sorry :(