diff --git a/wp-includes/author-template.php b/wp-includes/author-template.php index 2570a4035b..faeb6a89a0 100644 --- a/wp-includes/author-template.php +++ b/wp-includes/author-template.php @@ -481,14 +481,15 @@ function wp_list_authors( $args = '' ) { $post_counts = apply_filters( 'pre_wp_list_authors_post_counts_query', false, $parsed_args ); if ( ! is_array( $post_counts ) ) { - $post_counts = $wpdb->get_results( + $post_counts = array(); + $post_counts_query = $wpdb->get_results( "SELECT DISTINCT post_author, COUNT(ID) AS count FROM $wpdb->posts WHERE " . get_private_posts_cap_sql( 'post' ) . ' GROUP BY post_author' ); - foreach ( (array) $post_counts as $row ) { + foreach ( (array) $post_counts_query as $row ) { $post_counts[ $row->post_author ] = $row->count; } } diff --git a/wp-includes/version.php b/wp-includes/version.php index 31d25fd6e6..db827d850d 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.2-beta3-55443'; +$wp_version = '6.2-beta3-55444'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.