From 3395cc4a626f6f995fc324e6d234e727d5052a1f Mon Sep 17 00:00:00 2001 From: Mark Jaquith Date: Wed, 23 Mar 2011 21:25:35 +0000 Subject: [PATCH] Prevent Notice if the author object is not set. git-svn-id: https://develop.svn.wordpress.org/trunk@17548 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/author-template.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wp-includes/author-template.php b/wp-includes/author-template.php index 641b69d46f..926ec49ff9 100644 --- a/wp-includes/author-template.php +++ b/wp-includes/author-template.php @@ -203,6 +203,8 @@ function the_author_posts_link($deprecated = '') { _deprecated_argument( __FUNCTION__, '2.1' ); global $authordata; + if ( !is_object( $authordata ) ) + return false; $link = sprintf( '%3$s', get_author_posts_url( $authordata->ID, $authordata->user_nicename ),