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

WordPress Trac wp-trac at lists.automattic.com
Mon Dec 28 07:21:25 UTC 2009


#11566: clean_comment_cache() does not clean $GLOBALS['comment']
--------------------------+-------------------------------------------------
 Reporter:  sirzooro      |       Owner:           
     Type:  defect (bug)  |      Status:  new      
 Priority:  normal        |   Milestone:  3.0      
Component:  Comments      |     Version:  2.9      
 Severity:  normal        |    Keywords:  has-patch
--------------------------+-------------------------------------------------
Changes (by sirzooro):

  * milestone:  2.9.1 => 3.0


Comment:

 `get_comment()` uses `wp_cache_add()`/`wp_cache_get()`, and additionally
 that global.

 As I checked, $GLOBALS['comment'] is set by `Walker_Comment::start_el()`,
 and functions from comment-template.php relies on this variable. Therefore
 my patch may introduce bug when some plugin will change comment when it is
 displayed. Looks that other solution may be needed here.

 BTW, I clear this variable in my comment, so it works now. Therefore I
 think we can move this to 3.0.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/11566#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list