Make WordPress Core

Ticket #39732: 39732.12.diff

File 39732.12.diff, 905 bytes (added by SergeyBiryukov, 3 years ago)
  • src/wp-includes/comment.php

     
    24222422 * @since 2.0.0
    24232423 * @since 4.9.0 Add updating comment meta during comment update.
    24242424 * @since 5.5.0 The `$wp_error` parameter was added.
     2425 * @since 5.5.0 The return values for an invalid comment or post ID
     2426 *              were changed to false instead of 0.
    24252427 *
    24262428 * @global wpdb $wpdb WordPress database abstraction object.
    24272429 *
     
    24392441                if ( $wp_error ) {
    24402442                        return new WP_Error( 'invalid_comment_id', __( 'Invalid comment ID.' ) );
    24412443                } else {
    2442                         return 0;
     2444                        return false;
    24432445                }
    24442446        }
    24452447
     
    24482450                if ( $wp_error ) {
    24492451                        return new WP_Error( 'invalid_post_id', __( 'Invalid post ID.' ) );
    24502452                } else {
    2451                         return 0;
     2453                        return false;
    24522454                }
    24532455        }
    24542456