Issues

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

Issue Type: Bug Created: 2008-06-23T19:04:56.000+0000 Last Updated: 2008-10-28T15:35:10.000+0000 Status: Resolved Fix version(s): Reporter: C Snover (snover) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend_View

Related issues: - ZF-3505

Attachments:

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.

<pre class="highlight">
        if (isset($info['attribs']['disable']) 
            && is_scalar($info['attribs']['disable'])) 

Should be something like

<pre class="highlight">
        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

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts