From 7fedfd4dc13200edb7a1e467d78b619cd7235b92 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 31 Dec 2024 19:17:10 +0000 Subject: [PATCH] Coding Standards: Use strict comparison in `wp_count_attachments()`. Follow-up to [54255]. Props aristath, poena, afercia, SergeyBiryukov. See #62279. git-svn-id: https://develop.svn.wordpress.org/trunk@59567 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/post.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wp-includes/post.php b/src/wp-includes/post.php index dfdd41ed5ef93..3c3a422430324 100644 --- a/src/wp-includes/post.php +++ b/src/wp-includes/post.php @@ -3390,7 +3390,8 @@ function wp_count_attachments( $mime_type = '' ) { ); $counts = wp_cache_get( $cache_key, 'counts' ); - if ( false == $counts ) { + + if ( false === $counts ) { $and = wp_post_mime_type_where( $mime_type ); $count = $wpdb->get_results( "SELECT post_mime_type, COUNT( * ) AS num_posts FROM $wpdb->posts WHERE post_type = 'attachment' AND post_status != 'trash' $and GROUP BY post_mime_type", ARRAY_A );