Permalink
Browse files

Fix a notice in [20565] where get_the_author_meta() may be called pri…

…or to postdata from being set up. In this case, the function should return nothing (via the filter). props johnjamesjacoby. fixes #20529. see #20285.

git-svn-id: http://svn.automattic.com/wordpress/trunk@20575 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information...
1 parent 300ea78 commit 0fcb84d9c1a1c6d48063135f28780099dff039c8 nacin committed Apr 24, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 wp-includes/author-template.php
@@ -99,7 +99,7 @@ function the_modified_author() {
function get_the_author_meta( $field = '', $user_id = false ) {
if ( ! $user_id ) {
global $authordata;
- $user_id = $authordata->ID;
+ $user_id = isset( $authordata->ID ) ? $authordata->ID : 0;
} else {
$authordata = get_userdata( $user_id );
}

0 comments on commit 0fcb84d

Please sign in to comment.