ZF-5209: Disarm Zend_Mail_Part::__get()
Description
i having some trouble reading mails that have some missing headers. Unlike other classes it is not possible to check if a header exists. I found a __get() method that throws some exceptions which is not very useful if you are using template engines like smarty:
{{
{$message->subject}
}}
As mentiond above this throws a Zend_Mail_Exception and the rest of the template would not be rendered.
Maybe this is the way you want to use the Zend_Mail_Part::__get, but then there has to be a __isset Method to check if the header exists, without throwing exceptions.
Is that possible?
Kind regards, Daniel
Comments
Posted by Benjamin Eberlei (beberlei) on 2009-01-11T01:13:53.000+0000
A function "headerExists()" and a proxy __isset were added to Zend_Mail_Part class
Posted by old of Satoru Yoshida (yoshida@zend.co.jp) on 2009-01-30T21:05:05.000+0000
I copied to 1.7 branch at SVN r13885
Posted by old of Satoru Yoshida (yoshida@zend.co.jp) on 2009-02-02T18:20:24.000+0000
Sorry, not in 1.7.4. I think it will be released in next minor or major.