Make WordPress Core


Ignore:
Timestamp:
06/29/2020 11:40:56 PM (5 years ago)
Author:
SergeyBiryukov
Message:

Comments: Make wp_update_comment() return a WP_Error object for a canceled update, if $wp_error parameter is true.

Remove redundant checks for wp_update_comment() results being false, as the function always returns a WP_Error object now if $wp_error is true.

Follow-up to [48154], [48215], [48216].

See #39732.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-xmlrpc-server.php

    r48154 r48218  
    37903790
    37913791        $result = wp_update_comment( $comment, true );
    3792         if ( is_wp_error( $result ) || false === $result ) {
     3792        if ( is_wp_error( $result ) ) {
    37933793            return new IXR_Error( 500, $result->get_error_message() );
    37943794        }
Note: See TracChangeset for help on using the changeset viewer.