Skip to content

Commit 557fe1d

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

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5457,8 +5457,8 @@ public function mw_newPost( $args ) {
54575457

54585458
$post_author = $user->ID;
54595459

5460-
// If an author id was provided then use it instead.
5461-
if ( isset( $content_struct['wp_author_id'] ) && ( $user->ID != $content_struct['wp_author_id'] ) ) {
5460+
// If an author ID was provided then use it instead.
5461+
if ( isset( $content_struct['wp_author_id'] ) && ( $user->ID !== (int) $content_struct['wp_author_id'] ) ) {
54625462
switch ( $post_type ) {
54635463
case 'post':
54645464
if ( ! current_user_can( 'edit_others_posts' ) ) {

0 commit comments

Comments
 (0)