Skip to content

Commit fe241a9

Browse files
Coding Standards: Use strict comparison in wp_xmlrpc_server::_insert_post().
Follow-up to [19848]. Props aristath, poena, afercia, SergeyBiryukov. See #62279. git-svn-id: https://develop.svn.wordpress.org/trunk@59707 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 08a292b commit fe241a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wp-includes/class-wp-xmlrpc-server.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1488,7 +1488,7 @@ protected function _insert_post( $user, $content_struct ) {
14881488
}
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.' ) );
14941494
}

0 commit comments

Comments
 (0)