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


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


Assigning to Brian

Aware of this; will look into it this evening.

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

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: <> 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.

I fixed this against trunk, by the way.

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?

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!