ZF-6637: headMeta() making PHP fatal error

Issue Type: Bug Created: 2009-05-13T12:08:42.000+0000 Last Updated: 2009-06-12T10:46:17.000+0000 Status: Resolved Fix version(s): - 1.8.4 (23/Jun/09)

Reporter: julien PAULI (doctorrock83) Assignee: julien PAULI (doctorrock83) Tags: - Zend_View

Related issues: Attachments:


An exception is thrown in __toString() which is forbidden by PHP behavior (resulting in a PHP fatal error)

Use case :

<pre class="highlight">
echo $this->headMeta('some content','tag value','not-allowed-tag-name');

headMeta's toString() calls for itemToString() which then check the tag name. If it doesn't exist, it throws an exception (in the headMeta's case, only 'http-equip' is allowed as a tag name).

I suggest that instead of throwing an exception, it should return an empty string, resulting in no tag printed instead of a PHP fatal error. We could also tranform the exception in PHP Warning as a second solution.

What do you think ?


Posted by julien PAULI (doctorrock83) on 2009-06-12T10:46:13.000+0000

fixed at r16026

Have you found an issue?

See the Overview section for more details.


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

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