Issues

ZF-11620: formRadio ignores doctype when selecting default list separator

Issue Type: Bug Created: 2011-07-28T14:21:44.000+0000 Last Updated: 2012-06-02T01:03:59.000+0000 Status: Resolved Fix version(s): - 1.12.0 (27/Aug/12)

Reporter: Kai Uwe (kaiuwe) Assignee: Kai Uwe (kaiuwe) Tags: - Zend_View

  • FixForZF1.12
  • state:patch-ready-for-review
  • zf-caretaker-adamlundrigan
  • zf-crteam-review

Related issues: Attachments: - FormRadio.php.patch

Description

<pre class="highlight">
public function formRadio($name, $value = null, $attribs = null,
        $options = null, $listsep = "<br></br>\n")
{
    // ...

    // done!
    $xhtml .= implode($listsep, $list);
}

My proposal:

<pre class="highlight">
public function formRadio($name, $value = null, $attribs = null,
    $options = null, $listsep = "<br></br>\n")
{
    // ...
    
    // XHTML or HTML for standard list separator?
    if (!$this->_isXhtml() && false !== strpos($listsep, '<br></br>')) {
        $listsep = str_replace('<br></br>', '<br></br>', $listsep);
    }

    // done!
    $xhtml .= implode($listsep, $list);

    return $xhtml;
}

Comments

Posted by Kai Uwe (kaiuwe) on 2011-07-28T14:24:18.000+0000

Fix and unit test added.

Posted by Adam Lundrigan (adamlundrigan) on 2011-11-07T15:39:49.000+0000

I've tested the patch by applying against trunk, and everything appears to be OK. Unit tests pass individually, and entire Zend_View_Helper suite passes as well.

Posted by Adam Lundrigan (adamlundrigan) on 2012-06-02T01:02:55.000+0000

Fixed in trunk (1.12.0): r24865

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