ZF-3896: Zend_Form_Decorator_Fieldset uses form's class attribute if both attributes are set


In Zend_Form_Decorator_Fieldset line 73, the line $options = array_merge($options, $attribs);

should be

$options = array_merge($attribs, $options);

This is because the current version overwrites specified attribs if they are the same as the Form.

For example, let's take a form:

$form = new Zend_Form(); $form->setAttrib ( 'class', 'FormClass' ); $form->addDecorator('Fieldset',array('class'=>'FieldsetClass'));

The fieldset would be rendered with the FormClass instead of FieldsetClass as expected.


I confirm the bug AND the fix to be functional with release 1.7.4. It's not just Zend_Form, any other form object using the "Fieldset" decorator will generate this problem.

Fixed with issue ZF-10679.