r20565 introduces get_the_author_meta() regression
|Reported by:||johnjamesjacoby||Owned by:||nacin|
Plugins like BuddyPress and bbPress use get_the_author_meta() on posts in loops that may not set the $post global or might not even be a post at all. Things like shortcodes and secondary loops of posts with their own WP_Query object still need to use get_the_author_meta() and might not have user ID information available in the $authordata global.
I suggest a few sanity checks to check for object/array values, and load/reset them if they aren't around. Long term we should look into smoother ways to get possibly cached post author data directly.
BackPress, bbPress 1.x, and WordPress pre 2.8 had functions like get_the_author_id() for convenience sake, but they were all deprecated in WordPress 2.8 in favor of the singular author_meta function.
Change History (8)
- Owner set to nacin
- Resolution set to fixed
- Status changed from new to closed