ZF-11835: Conditional comments functionality missing from Zend_View_Helper_HeadMeta

Issue Type: Bug Created: 2011-10-21T01:18:42.000+0000 Last Updated: 2011-11-21T23:04:03.000+0000 Status: Resolved Fix version(s): - 1.11.12 (22/Jun/12)

Reporter: Brett McBride (brett_mcbride) Assignee: Adam Lundrigan (adamlundrigan) Tags: - Zend_View

  • zf-caretaker-adamlundrigan

Related issues: Attachments: - ZF-11835.patch

Description… describes passing a $conditionalHttpEquiv parameter as a modifier to methods such as appendHttpEquiv. Although there are no code examples for what to pass for headMeta, there are examples in headScript which pass an array of the form ('conditional' => 'lt IE 7'), for example.

Zend_View_Helper_HeadMeta::itemToString() does nothing with a conditional key, whereas Zend_View_Helper_HeadScript::itemToString() treats 'conditional' as a special case and wraps the value in a javascript comment.


Posted by Adam Lundrigan (adamlundrigan) on 2011-10-28T14:56:10.000+0000

Attached patch which implements behavior matching that of Zend_View_Helper_HeadScript

Posted by Rob Allen (rob) on 2011-11-21T21:00:34.000+0000

I don't think we need the

<pre class="highlight">
&& !empty($item->modifiers['conditional'])

as the isset() will take care of that as well?

Posted by Rob Allen (rob) on 2011-11-21T21:27:42.000+0000

Just tested and you're right - we do need the !empty().

Patch looks good to me.

Posted by Adam Lundrigan (adamlundrigan) on 2011-11-21T22:50:02.000+0000


Fixed in trunk r24561 Merged to release-1.11 in r24562

Posted by Adam Lundrigan (adamlundrigan) on 2011-11-21T23:03:11.000+0000

ZF2 Pull Request:

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.