After the global churn in [33964], also set $post to null at the end of WP_Comments_List_Table::single_row() to ensure that an orphaned comment doesn't inherit the previous row's $post context.

See #33638.

Built from https://develop.svn.wordpress.org/trunk@33986


git-svn-id: http://core.svn.wordpress.org/trunk@33955 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2015-09-10 03:12:23 +00:00
parent 2c21d12232
commit 52516a68ab
2 changed files with 6 additions and 3 deletions

View File

@ -448,13 +448,16 @@ class WP_Comments_List_Table extends WP_List_Table {
}
$the_comment_class = join( ' ', get_comment_class( $the_comment_class, $comment, $comment->comment_post_ID ) );
$post = get_post( $comment->comment_post_ID );
if ( $comment->comment_post_ID > 0 ) {
$post = get_post( $comment->comment_post_ID );
}
$this->user_can = current_user_can( 'edit_comment', $comment->comment_ID );
echo "<tr id='comment-$comment->comment_ID' class='$the_comment_class'>";
$this->single_row_columns( $comment );
echo "</tr>\n";
$post = null;
}
/**

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.4-alpha-33985';
$wp_version = '4.4-alpha-33986';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.