Issues

ZF-6469: Exception thrown in destruct method of Zend_Log by Zend_Log_Writer_Mail

Issue Type: Bug Created: 2009-04-29T06:01:48.000+0000 Last Updated: 2009-06-23T13:45:41.000+0000 Status: Resolved Fix version(s): Reporter: swepp GmbH (swepp) Assignee: Brian DeShong (bdeshong) Tags: - Zend_Log

Related issues: Attachments: - trunk.diff

Description

Hi everyone,

If you use Zend_Log_Writer_Mail with Zend_Log and Zend_Log calls the desctruct method, then Zend_Log_Writer_Mail sends all Logs per email. But if an error occurs while sending the email, Zend_Mail_Transport_Sendmail throws an exception and you get the following error:

Output: Fatal error: Exception thrown without a stack frame in Unknown on line 0

Comments

Posted by Matthew Weier O'Phinney (matthew) on 2009-04-29T07:31:19.000+0000

Assigning to Brian

Posted by Brian DeShong (bdeshong) on 2009-04-29T09:52:56.000+0000

Aware of this; will look into it this evening.

Posted by Brian DeShong (bdeshong) on 2009-04-29T19:12:32.000+0000

Patch file for Zend_Log_Writer_Mail and its unit tests. I also committed it to the repository in trunk; hope that's okay.

Posted by Brian DeShong (bdeshong) on 2009-04-29T19:14:28.000+0000

I committed this to the repository myself; hope that's okay.

Basically, rather than throwing exceptions in Zend_Log_Writer_Mail::shutdown(), I'm raising a notice for any Zend_Layout-born exception, and a warning for any Zend_Mail-born exception.

Also added unit test methods to maintain 100% code coverage.

Can someone review my approach to sign off on it or provide feedback?

$ svn --username bdeshong commit Authentication realm: <http://framework.zend.com:80> Subversion Repositories Password for 'bdeshong': Sending library/Zend/Log/Writer/Mail.php Sending tests/Zend/Log/Writer/MailTest.php Transmitting file data .. Committed revision 15255.

Posted by Brian DeShong (bdeshong) on 2009-04-29T19:15:01.000+0000

I fixed this against trunk, by the way.

Posted by Brian DeShong (bdeshong) on 2009-05-12T18:14:24.000+0000

Just curious how this fix makes it into the next release. Should I have set Fix Version/s to, say, 1.8.1 or 1.8.2?

Posted by Brian DeShong (bdeshong) on 2009-06-23T13:45:41.000+0000

Can someone maybe weigh in on this fix? I fixed it back in mid-May and figured it would have been released in 1.8.1 or at least 1.8.2.

What's the process I need to go through to get this into, say, 1.8.5? Please advise. Thanks!

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