[wp-trac] [WordPress Trac] #39732: Allowing wp_update_comment() to return WP_Error

WordPress Trac noreply at wordpress.org
Wed Jun 24 00:03:49 UTC 2020


#39732: Allowing wp_update_comment() to return WP_Error
-------------------------------------------------+-------------------------
 Reporter:  enrico.sorcinelli                    |       Owner:
                                                 |  enrico.sorcinelli
     Type:  enhancement                          |      Status:  closed
 Priority:  normal                               |   Milestone:  5.5
Component:  Comments                             |     Version:  4.8
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests needs-dev-  |     Focuses:
  note commit                                    |
-------------------------------------------------+-------------------------
Changes (by whyisjake):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"48154" 48154]:
 {{{
 #!CommitTicketReference repository="" revision="48154"
 Comments: Allow `wp_update_comment()` to return `WP_Error()`.

 The `wp_update_comment_data` filter introduced in 4.7 allows comment data
 to be filtered before it is updated in the database.

 The patch aims to handle `WP_Error` as the filter above return value in a
 similar manner as is done for `wp_new_comment()`.


 Fixes #39732.

 Props: enricosorcinelli, swissspidy, gkloveweb, jnylen0, jbpaul17,
 afercia, SergeyBiryukov, audrasjb, imath, davidbaumwald.
 }}}

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


More information about the wp-trac mailing list