[wp-trac] [WordPress Trac] #23291: wp_mail should handle phpmailer exceptions instead of ignoring them

WordPress Trac noreply at wordpress.org
Sat Jan 26 23:28:24 UTC 2013


#23291: wp_mail should handle phpmailer exceptions instead of ignoring them
-------------------------+------------------------------
 Reporter:  mark-k       |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Mail         |     Version:  3.5
 Severity:  minor        |  Resolution:
 Keywords:  has-patch    |
-------------------------+------------------------------

Comment (by iandunn):

 I don't really buy that set_error_handler() is hard to use, can you
 elaborate on that?

 I think bringing up suppressed errors is a very good point, though. It
 looks like 4 out of the 19 calls to wp_mail() in core suppress errors.

 To me that begs 2 questions,

 1. Why is it not used consistently? Are there reasons for suppressing it
 in some cases, or is it just the lack of an official policy that leads to
 different developer's preferences being implemented in different patches?
 2. Should error suppression be used at all? What's the case for it? I
 think it's reasonable to assume that production servers will have
 display_errors disabled, and that anyone with it enabled on a dev server
 would want to be aware of the errors.

 I'd propose getting rid of error suppression for all wp_mail() calls, so
 that the new trigger_error() calls in this patch can be relied upon.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/23291#comment:10>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list