Make WordPress Core

Ticket #49236: 49236.3.patch

File 49236.3.patch, 1.2 KB (added by ocean90, 5 years ago)
  • src/wp-includes/class-wp-comment-query.php

     
    741741
    742742                                        case 'comment':
    743743                                        case 'comments':
     744                                                $comment_types[ $operator ][] = "''";
    744745                                                $comment_types[ $operator ][] = "'comment'";
    745746                                                break;
    746747
  • src/wp-includes/comment.php

     
    19021902        $comment_karma    = ! isset( $data['comment_karma'] ) ? 0 : $data['comment_karma'];
    19031903        $comment_approved = ! isset( $data['comment_approved'] ) ? 1 : $data['comment_approved'];
    19041904        $comment_agent    = ! isset( $data['comment_agent'] ) ? '' : $data['comment_agent'];
    1905         $comment_type     = ! isset( $data['comment_type'] ) ? 'comment' : $data['comment_type'];
     1905        $comment_type     = empty( $data['comment_type'] ) ? 'comment' : $data['comment_type'];
    19061906        $comment_parent   = ! isset( $data['comment_parent'] ) ? 0 : $data['comment_parent'];
    19071907
    19081908        $user_id = ! isset( $data['user_id'] ) ? 0 : $data['user_id'];