ZF-3502: FormElement::_getInfo doesn't properly check value of 'disable' attribute


Currently, FormElement::_getInfo() doesn't actually check the value of the 'disable' attribute in the attribs array. Instead, it only checks to see if it exists and is a scalar value, and if so, it assumes that you want to disable the element, which is certainly not the case when, for example, disable is set to false.

        if (isset($info['attribs']['disable']) 
            && is_scalar($info['attribs']['disable'])) 

Should be something like

        if (isset($info['attribs']['disable'])
            && is_scalar($info['attribs']['disable'])  && !!$info['attribs']['disable'])

Also, it seems a little weird that we're using the word 'disable' where in HTML it is 'disabled', but that might be something for another bug. :)


Set the wrong priority initially. Sorry for the bugspam.

This has been resolved with r11871 (…) and is a duplicate of