ZF-2528: Zend_Form __toString() implementations should not throw exceptions

Issue Type: Improvement Created: 2008-01-30T10:00:00.000+0000 Last Updated: 2008-03-21T16:25:17.000+0000 Status: Resolved Fix version(s): - 1.5.0 (17/Mar/08)

Reporter: Matthew Weier O'Phinney (matthew) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend_Form

Related issues: Attachments:


Currently, all __toString() implementations in the Zend_Form classes proxy to render(), which in turn proxies to decorators and potentially other classes -- any of which could throw an exception. PHP doesn't like exceptions in __toString() and throws an E_FATAL that doesn't accurately depict the root cause of the issue.

To make debugging simpler, __toString() should capture exceptions, and then raise an E_USER_WARNING with the exception message.


Posted by Matthew Weier O'Phinney (matthew) on 2008-01-30T11:01:26.000+0000

Resolved in r7697

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.