Skip to content

Commit

Permalink
Coding Standards: Use strict comparison in `wp_xmlrpc_server::mw_newP…
Browse files Browse the repository at this point in the history
…ost()`.

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
  • Loading branch information
SergeyBiryukov committed Jan 27, 2025
1 parent 1b57f98 commit 557fe1d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/wp-includes/class-wp-xmlrpc-server.php
Original file line number Diff line number Diff line change
Expand Up @@ -5457,8 +5457,8 @@ public function mw_newPost( $args ) {

$post_author = $user->ID;

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

0 comments on commit 557fe1d

Please sign in to comment.