WordPress.org

Make WordPress Core

Ticket #38425: 38425.diff

File 38425.diff, 782 bytes (added by rabmalin, 4 years ago)
  • src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php

     
    418418                if ( ! isset( $prepared_comment['comment_author_url'] ) ) {
    419419                        $prepared_comment['comment_author_url'] = '';
    420420                }
     421                if ( ! isset( $prepared_comment['comment_agent'] ) ) {
     422                        $prepared_comment['comment_agent'] = '';
     423                }
    421424
    422                 $prepared_comment['comment_agent'] = '';
    423425                $prepared_comment['comment_approved'] = wp_allow_comment( $prepared_comment, true );
    424426
    425427                if ( is_wp_error( $prepared_comment['comment_approved'] ) ) {