From e1b5d2d2bf3bf60fdacdcd5a7cba2f3b4e98e582 Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Sat, 23 Jan 2016 22:15:19 +0000 Subject: [PATCH] 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. git-svn-id: https://develop.svn.wordpress.org/trunk@36387 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/class-wp-comments-list-table.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/wp-admin/includes/class-wp-comments-list-table.php b/src/wp-admin/includes/class-wp-comments-list-table.php index f12565a95f..da54905b72 100644 --- a/src/wp-admin/includes/class-wp-comments-list-table.php +++ b/src/wp-admin/includes/class-wp-comments-list-table.php @@ -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 */