Skip to content

Commit

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

Follow-up to [40692].

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

git-svn-id: https://develop.svn.wordpress.org/trunk@59726 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
SergeyBiryukov committed Jan 29, 2025
1 parent d73702a commit 8246f31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wp-includes/class-wp-xmlrpc-server.php
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ public function set_custom_fields( $post_id, $fields ) {
$meta['id'] = (int) $meta['id'];
$pmeta = get_metadata_by_mid( 'post', $meta['id'] );

if ( ! $pmeta || $pmeta->post_id != $post_id ) {
if ( ! $pmeta || (int) $pmeta->post_id !== $post_id ) {
continue;
}

Expand Down

0 comments on commit 8246f31

Please sign in to comment.