[wp-trac] [WordPress Trac] #57011: wp_list_authors is broken in WordPress 6.1
WordPress Trac
noreply at wordpress.org
Tue Jan 3 21:45:08 UTC 2023
#57011: wp_list_authors is broken in WordPress 6.1
----------------------------------------+-----------------------------
Reporter: lifeboat | Owner: SergeyBiryukov
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: 6.1.2
Component: Users | Version: 6.1
Severity: normal | Resolution:
Keywords: has-patch needs-unit-tests | Focuses:
----------------------------------------+-----------------------------
Comment (by johnbillion):
I think this happens when the numerically indexed result of `$post_counts
= $wpdb->get_results( ... )` contains a key that matches the ID of a user
who doesn't have any posts, therefore the iteration after it doesn't
replace the stdClass object with the `count` property. For example, if
element with key `1` in that array happens to match the ID of a user who
doesn't have any posts.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57011#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list