Make WordPress Core

Ticket #39380: 39380.patch

File 39380.patch, 1.5 KB (added by dshanske, 8 years ago)
  • src/wp-includes/comment.php

    diff --git src/wp-includes/comment.php src/wp-includes/comment.php
    index 8bb2e9e..ead3377 100644
    function wp_update_comment($commentarr) { 
    21862186
    21872187        $comment_ID = $data['comment_ID'];
    21882188        $comment_post_ID = $data['comment_post_ID'];
    2189         $keys = array( 'comment_post_ID', 'comment_content', 'comment_author', 'comment_author_email', 'comment_approved', 'comment_karma', 'comment_author_url', 'comment_date', 'comment_date_gmt', 'comment_type', 'comment_parent', 'user_id', 'comment_agent', 'comment_author_IP' );
    2190         $data = wp_array_slice_assoc( $data, $keys );
    21912189
    21922190        /**
    21932191         * Filters the comment data immediately before it is updated in the database.
    function wp_update_comment($commentarr) { 
    22012199         * @param array $commentarr The new, raw comment data.
    22022200         */
    22032201        $data = apply_filters( 'wp_update_comment_data', $data, $comment, $commentarr );
    2204 
    2205         $rval = $wpdb->update( $wpdb->comments, $data, compact( 'comment_ID' ) );
     2202       
     2203        $keys = array( 'comment_post_ID', 'comment_content', 'comment_author', 'comment_author_email', 'comment_approved', 'comment_karma', 'comment_author_url', 'comment_date', 'comment_date_gmt', 'comment     _type', 'comment_parent', 'user_id', 'comment_agent', 'comment_author_IP' );
     2204       
     2205        $sliced_data = wp_array_slice_assoc( $data, $keys );
     2206        $rval = $wpdb->update( $wpdb->comments, $sliced_data, compact( 'comment_ID' ) );
    22062207
    22072208        clean_comment_cache( $comment_ID );
    22082209        wp_update_comment_count( $comment_post_ID );