[wp-trac] [WordPress Trac] #11566: clean_comment_cache() does not clean $GLOBALS['comment']

WordPress Trac noreply at wordpress.org
Mon Aug 31 20:41:11 UTC 2015


#11566: clean_comment_cache() does not clean $GLOBALS['comment']
------------------------------------+-----------------------------
 Reporter:  sirzooro                |       Owner:  wonderboymusic
     Type:  defect (bug)            |      Status:  assigned
 Priority:  normal                  |   Milestone:  4.4
Component:  Comments                |     Version:  2.9
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |     Focuses:
------------------------------------+-----------------------------

Comment (by wonderboymusic):

 In [changeset:"33826"]:
 {{{
 #!CommitTicketReference repository="" revision="33826"
 `WP_Comments_List_Table::single_row()` has no reason to set the `$comment`
 global. No other methods use it, and we are not in template/loop context.
 This can mess with the response of `get_comment()` elsewhere, since
 `get_comment()` internally bypasses the cache/db when a global is set.

 See #11566.
 }}}

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


More information about the wp-trac mailing list