From 00cf77999d9e8bae48c9adf8cb0903ca0f8a0d0e Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Sat, 23 Jan 2016 22:16:26 +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. Built from https://develop.svn.wordpress.org/trunk@36387 git-svn-id: http://core.svn.wordpress.org/trunk@36354 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-comments-list-table.php | 10 +++++----- wp-includes/version.php | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/wp-admin/includes/class-wp-comments-list-table.php b/wp-admin/includes/class-wp-comments-list-table.php index f12565a95f..da54905b72 100644 --- a/wp-admin/includes/class-wp-comments-list-table.php +++ b/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 */ diff --git a/wp-includes/version.php b/wp-includes/version.php index b7f184f96f..48518e1c9b 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.