Make WordPress Core

Changeset 35674


Ignore:
Timestamp:
11/18/2015 07:04:33 PM (9 years ago)
Author:
wonderboymusic
Message:

List Tables: because we can never eradicate the existence of globals, ensure that $comment is hoisted into the global space inside WP_Comments_List_Table::single_row().

Fixes #34654.

File:
1 edited

Legend:

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

    r35670 r35674  
    475475
    476476    /**
    477      * @global WP_Post $post
    478      *
    479      * @param object $comment
    480      */
    481     public function single_row( $comment ) {
    482         global $post;
     477     * @global WP_Post    $post
     478     * @global WP_Comment $comment
     479     *
     480     * @param WP_Comment $item
     481     */
     482    public function single_row( $item ) {
     483        global $post, $comment;
     484
     485        $comment = $item;
    483486
    484487        $the_comment_class = wp_get_comment_status( $comment );
     
    497500        echo "</tr>\n";
    498501
    499         $post = null;
     502        unset( $post, $comment );
    500503    }
    501504
Note: See TracChangeset for help on using the changeset viewer.