WordPress.org

Make WordPress Core

Changeset 36387


Ignore:
Timestamp:
01/23/2016 10:15:19 PM (4 years ago)
Author:
boonebgorges
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-comments-list-table.php

    r36339 r36387  
    3434     * @see WP_List_Table::__construct() for more information on default arguments.
    3535     *
    36      * @global int $post_id
     36     * @global int|bool $post_id
    3737     *
    3838     * @param array $args An associative array of arguments.
     
    4141        global $post_id;
    4242
    43         $post_id = isset( $_REQUEST['p'] ) ? absint( $_REQUEST['p'] ) : 0;
     43        $post_id = isset( $_REQUEST['p'] ) ? absint( $_REQUEST['p'] ) : false;
    4444
    4545        if ( get_option( 'show_avatars' ) ) {
     
    7070    /**
    7171     *
    72      * @global int    $post_id
     72     * @global int|bool $post_id
    7373     * @global string $comment_status
    7474     * @global string $search
     
    193193    /**
    194194     *
    195      * @global int $post_id
     195     * @global int|bool $post_id
    196196     * @global string $comment_status
    197197     * @global string $comment_type
     
    384384    /**
    385385     *
    386      * @global int $post_id
     386     * @global int|bool $post_id
    387387     *
    388388     * @return array
Note: See TracChangeset for help on using the changeset viewer.