Skip to content

Commit

Permalink
Coding Standards: Use strict comparison in get_posts_by_author_sql().
Browse files Browse the repository at this point in the history
Follow-up to [13576], [25669].

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

git-svn-id: https://develop.svn.wordpress.org/trunk@59596 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
SergeyBiryukov committed Jan 10, 2025
1 parent a48e180 commit 1dd2f28
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wp-includes/post.php
Original file line number Diff line number Diff line change
Expand Up @@ -7358,7 +7358,7 @@ function get_posts_by_author_sql( $post_type, $full = true, $post_author = null,
$id = get_current_user_id();
if ( null === $post_author || ! $full ) {
$post_status_sql .= " OR post_status = 'private' AND post_author = $id";
} elseif ( $id == (int) $post_author ) {
} elseif ( $id === (int) $post_author ) {
$post_status_sql .= " OR post_status = 'private'";
} // Else none.
} // Else none.
Expand Down

0 comments on commit 1dd2f28

Please sign in to comment.