[wp-trac] [WordPress Trac] #39730: Checking if wp_new_comment() return value is a WP_Error

WordPress Trac noreply at wordpress.org
Mon Oct 23 22:11:13 UTC 2017


#39730: Checking if wp_new_comment() return value is a WP_Error
---------------------------------------+----------------------------
 Reporter:  enrico.sorcinelli          |       Owner:  peterwilsoncc
     Type:  defect (bug)               |      Status:  closed
 Priority:  normal                     |   Milestone:  4.9
Component:  Comments                   |     Version:  4.8
 Severity:  normal                     |  Resolution:  fixed
 Keywords:  has-screenshots has-patch  |     Focuses:
---------------------------------------+----------------------------
Changes (by peterwilsoncc):

 * owner:   => peterwilsoncc
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"41980"]:
 {{{
 #!CommitTicketReference repository="" revision="41980"
 Comments: Check if `wp_new_comment()` returns an error.

 Adds checks throughout to allow for `wp_new_comment()` returning a
 `WP_Error` instance.

 Updates the docs for the `pre_comment_approved` filter to include that it
 can be passed an error.

 Props enrico.sorcinelli, ryotsun.
 Fixes #39730.
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39730#comment:20>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list