[wp-trac] [WordPress Trac] #14078: Don't send notifications for comments too early

WordPress Trac noreply at wordpress.org
Fri Sep 25 14:42:50 UTC 2015


#14078: Don't send notifications for comments too early
-------------------------+---------------------------
 Reporter:  mrmist       |       Owner:  boonebgorges
     Type:  enhancement  |      Status:  closed
 Priority:  normal       |   Milestone:  4.4
Component:  Comments     |     Version:  3.0
 Severity:  minor        |  Resolution:  fixed
 Keywords:               |     Focuses:
-------------------------+---------------------------

Comment (by boonebgorges):

 In [changeset:"34545"]:
 {{{
 #!CommitTicketReference repository="" revision="34545"
 Improve status checks when sending comment post author notification.

 [34537] hooked `wp_new_comment_notify_postauthor()` to the
 'wp_set_comment_status' when a comment had been approved. When performing
 multiple actions on a comment in the same request (as happens in
 `Tests_Ajax_DeleteComment::test_ajax_trash_double_action()`, and may
 happen
 sometimes in real life too), and when one of those actions involves
 deleting
 the comment, the `$comment_ID` passed to
 `wp_new_comment_notify_postauthor()`
 can correspond to an already-deleted comment. The `comment_status` check
 should
 account for this possibility.

 See #14078.
 }}}

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


More information about the wp-trac mailing list