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

WordPress Trac noreply at wordpress.org
Sun Jan 27 07:24:22 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 rmccue):

 Replying to [comment:15 iandunn]:
 > @rmccue, Adding a @wp_error param sounds like a good idea to me, but
 we'd still need to trigger_error(), unless you're suggesting we change all
 the core calls to wp_mail() to use the new param. Otherwise exceptions
 triggered by core calls to wp_mail() would still be ignored.

 I am indeed suggesting that we change core to do this.

 Replying to [comment:16 mark-k]:
 > Adding the parameter will fail because if you change the core to use it
 you will get errors on sites which override wp_mail and didn't update the
 function's signature

 Providing extra parameters to functions doesn't cause an error (with the
 exception of a few built-in PHP functions), so this isn't an issue. The
 only issue is if people are using an extra parameter for internal
 parameter passing, in which case they shouldn't be overriding `wp_mail()`
 with that.

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


More information about the wp-trac mailing list