In comments list table, `$post_id` should default to `false` rather than 0.

After [36381], the default value of `0` was causing the list table at
edit-comments.php to be empty. `false` prevents this.

This fix is likely temporary, while more research is done into the backward
compatibility concerns tied to [36381].

See #35090.
Built from https://develop.svn.wordpress.org/trunk@36387


git-svn-id: http://core.svn.wordpress.org/trunk@36354 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Boone Gorges 2016-01-23 22:16:26 +00:00
parent 51ae114302
commit 00cf77999d
2 changed files with 6 additions and 6 deletions

View File

@ -33,14 +33,14 @@ class WP_Comments_List_Table extends WP_List_Table {
*
* @see WP_List_Table::__construct() for more information on default arguments.
*
* @global int $post_id
* @global int|bool $post_id
*
* @param array $args An associative array of arguments.
*/
public function __construct( $args = array() ) {
global $post_id;
$post_id = isset( $_REQUEST['p'] ) ? absint( $_REQUEST['p'] ) : 0;
$post_id = isset( $_REQUEST['p'] ) ? absint( $_REQUEST['p'] ) : false;
if ( get_option( 'show_avatars' ) ) {
add_filter( 'comment_author', array( $this, 'floated_admin_avatar' ), 10, 2 );
@ -69,7 +69,7 @@ class WP_Comments_List_Table extends WP_List_Table {
/**
*
* @global int $post_id
* @global int|bool $post_id
* @global string $comment_status
* @global string $search
* @global string $comment_type
@ -192,7 +192,7 @@ class WP_Comments_List_Table extends WP_List_Table {
/**
*
* @global int $post_id
* @global int|bool $post_id
* @global string $comment_status
* @global string $comment_type
*/
@ -383,7 +383,7 @@ class WP_Comments_List_Table extends WP_List_Table {
/**
*
* @global int $post_id
* @global int|bool $post_id
*
* @return array
*/

View File

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