Skip to content

Commit 1dd2f28

Browse files
Coding Standards: Use strict comparison in get_posts_by_author_sql().
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
1 parent a48e180 commit 1dd2f28

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wp-includes/post.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7358,7 +7358,7 @@ function get_posts_by_author_sql( $post_type, $full = true, $post_author = null,
73587358
$id = get_current_user_id();
73597359
if ( null === $post_author || ! $full ) {
73607360
$post_status_sql .= " OR post_status = 'private' AND post_author = $id";
7361-
} elseif ( $id == (int) $post_author ) {
7361+
} elseif ( $id === (int) $post_author ) {
73627362
$post_status_sql .= " OR post_status = 'private'";
73637363
} // Else none.
73647364
} // Else none.

0 commit comments

Comments
 (0)