From b273bbf5381aec6ed3fc3b3757900cd24321286e Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 10 Jan 2025 18:14:23 +0000 Subject: [PATCH] Coding Standards: Use strict comparison in `get_posts_by_author_sql()`. Follow-up to [13576], [25669]. Props aristath, poena, afercia, SergeyBiryukov. See #62279. Built from https://develop.svn.wordpress.org/trunk@59596 git-svn-id: http://core.svn.wordpress.org/trunk@58982 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/post.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/post.php b/wp-includes/post.php index a0933f1ffd..ebf7c7f3a9 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -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. diff --git a/wp-includes/version.php b/wp-includes/version.php index e04ca9d679..8a52a916c8 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.8-alpha-59595'; +$wp_version = '6.8-alpha-59596'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.