ZF-11800: always included with form helper

Issue Type: Bug Created: 2011-10-06T19:01:11.000+0000 Last Updated: 2011-10-19T01:05:42.000+0000 Status: Resolved Fix version(s): - 1.11.12 (22/Jun/12)

Reporter: Ketil Stadskleiv (stadskle) Assignee: Adam Lundrigan (adamlundrigan) Tags: - Zend_View

  • bug

Related issues: - ZF-11747



This just happend when I upgrades to 1.11.11 is it is destroying all my forms. Hence the critical setting, for us who is using this extensively to create the form starter (but doing the form manually) this is critical.

The documentation states:

"form($name, $attribs, $content): Generates an XHTML form. All $attribs are escaped and rendered as XHTML attributes of the form tag. If $content is present and not a boolean FALSE, then that content is rendered within the start and close form tags; if $content is a boolean FALSE (the default), only the opening form tag is generated. "

So, if no content variable is set (or set to false) the should not be included. However, in 1.11.11 this does not work. Looking at the code, the last part of the helper looks like this:

if (false !== $content) { $xhtml .= $content; } $xhtml .= '';

So it is obvious that is included every time regardless of the value of $content. The code should be like this:

if (false !== $content) { $xhtml .= $content; $xhtml .= ''; }


Posted by Adam Lundrigan (adamlundrigan) on 2011-10-06T20:11:30.000+0000

See ZF-11747 (specifically, this comment)

Have you found an issue?

See the Overview section for more details.


© 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.