[wp-trac] [WordPress Trac] #33154: Issues with Editing Comments where the post ID is zero or post is deleted

WordPress Trac noreply at wordpress.org
Thu Aug 13 06:15:42 UTC 2015


#33154: Issues with Editing Comments where the post ID is zero or post is deleted
-----------------------------+-----------------------------
 Reporter:  johnnietb        |       Owner:  pento
     Type:  defect (bug)     |      Status:  assigned
 Priority:  normal           |   Milestone:  4.2.5
Component:  Role/Capability  |     Version:  4.2.3
 Severity:  normal           |  Resolution:
 Keywords:  has-patch        |     Focuses:  administration
-----------------------------+-----------------------------

Comment (by pento):

 I agree that we can't break the global - it'll probably have terrible side
 effects.

 [attachment:33154.5.diff] is [attachment:33154.3.diff] with the `$post =
 get_post( $comment->comment_post_ID );` line restored to `single_row()`.
 That'll keep the same behaviour for any plugins that rely on it, but it
 still fixes the warnings caused by orphan comments.

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


More information about the wp-trac mailing list