Make WordPress Core

Changeset 59707


Ignore:
Timestamp:
01/25/2025 02:32:35 PM (3 months ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Use strict comparison in wp_xmlrpc_server::_insert_post().

Follow-up to [19848].

Props aristath, poena, afercia, SergeyBiryukov.
See #62279.

File:
1 edited

Legend:

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

    r59699 r59707  
    14891489
    14901490        $post_data['post_author'] = absint( $post_data['post_author'] );
    1491         if ( ! empty( $post_data['post_author'] ) && $post_data['post_author'] != $user->ID ) {
     1491        if ( ! empty( $post_data['post_author'] ) && $post_data['post_author'] !== $user->ID ) {
    14921492            if ( ! current_user_can( $post_type->cap->edit_others_posts ) ) {
    14931493                return new IXR_Error( 401, __( 'Sorry, you are not allowed to create posts as this user.' ) );
Note: See TracChangeset for help on using the changeset viewer.