Fix a notice in [20565] where get_the_author_meta() may be called prior 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
This commit is contained in:
parent
300ea7891d
commit
0fcb84d9c1
|
@ -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 );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue