`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. Built from https://develop.svn.wordpress.org/trunk@33826 git-svn-id: http://core.svn.wordpress.org/trunk@33794 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8b1fe986c3
commit
7ab015c5ab
|
@ -428,16 +428,13 @@ class WP_Comments_List_Table extends WP_List_Table {
|
|||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @global WP_Post $post
|
||||
* @global object $comment
|
||||
*
|
||||
* @param object $a_comment
|
||||
* @param object $comment
|
||||
*/
|
||||
public function single_row( $a_comment ) {
|
||||
global $post, $comment;
|
||||
public function single_row( $comment ) {
|
||||
global $post;
|
||||
|
||||
$comment = $a_comment;
|
||||
$the_comment_class = wp_get_comment_status( $comment->comment_ID );
|
||||
if ( ! $the_comment_class ) {
|
||||
$the_comment_class = '';
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.4-alpha-33825';
|
||||
$wp_version = '4.4-alpha-33826';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue