[wp-trac] [WordPress Trac] #35506: The global `$post` object for rows in the comments list table is polluted if `comment_post_ID` = 0

WordPress Trac noreply at wordpress.org
Mon Jan 18 02:20:59 UTC 2016


#35506: The global `$post` object for rows in the comments list table is polluted
if `comment_post_ID` = 0
----------------------------+-----------------------------
 Reporter:  rachelbaker     |      Owner:
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Comments        |    Version:
 Severity:  normal          |   Keywords:  needs-patch
  Focuses:  administration  |
----------------------------+-----------------------------
 In `WP_Comments_List_Table->single_row()` the global $post object is only
 set for each row if `comment_post_ID` > 0.  In the `column_response`
 method the $post global is used to display the information about the
 related Post for each comment.  If the `comment_post_ID` is `0` then this
 column displays the related Post information from the previous row that
 could return a valid Post object from the `comment_post_ID`.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/35506>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list