List Tables: because we can never eradicate the existence of globals, ensure that $comment
is hoisted into the global space inside WP_Comments_List_Table::single_row()
.
Fixes #34654. git-svn-id: https://develop.svn.wordpress.org/trunk@35674 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
65c17a2d88
commit
0e5625e4fa
@ -474,12 +474,15 @@ class WP_Comments_List_Table extends WP_List_Table {
|
||||
}
|
||||
|
||||
/**
|
||||
* @global WP_Post $post
|
||||
* @global WP_Post $post
|
||||
* @global WP_Comment $comment
|
||||
*
|
||||
* @param object $comment
|
||||
* @param WP_Comment $item
|
||||
*/
|
||||
public function single_row( $comment ) {
|
||||
global $post;
|
||||
public function single_row( $item ) {
|
||||
global $post, $comment;
|
||||
|
||||
$comment = $item;
|
||||
|
||||
$the_comment_class = wp_get_comment_status( $comment );
|
||||
if ( ! $the_comment_class ) {
|
||||
@ -496,7 +499,7 @@ class WP_Comments_List_Table extends WP_List_Table {
|
||||
$this->single_row_columns( $comment );
|
||||
echo "</tr>\n";
|
||||
|
||||
$post = null;
|
||||
unset( $post, $comment );
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user