ZF-2754: Rendering a form after clearElements() has been called raises an exception
Description
Reproduce code:
$form = new Zend_Form();
$form->addElements(array(
'username' => 'text',
'password' => 'text',
));
$form->clearElements();
echo $form;
Expected: XHTML form with no content.
Actual:
PHP Warning: Corruption detected in form; invalid key found in internal iterator in .../framework/library/Zend/Form.php on line 2125
Comments
Posted by Rob Allen (rob) on 2008-03-03T08:49:44.000+0000
calling $form->clearDisplayGroups() causes the same exception.
Posted by Matthew Weier O'Phinney (matthew) on 2008-03-07T08:13:47.000+0000
Fixed in trunk and 1.5 release branch