ZF-3502: FormElement::_getInfo doesn't properly check value of 'disable' attribute
Description
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. :)
Comments
Posted by C Snover (snover) on 2008-06-23T19:05:51.000+0000
Set the wrong priority initially. Sorry for the bugspam.
Posted by Jon Whitcraft (sidhighwind) on 2008-10-28T15:34:48.000+0000
This has been resolved with r11871 (http://framework.zend.com/code/changelog/…) and is a duplicate of http://framework.zend.com/issues/browse/ZF-3505