diff --git a/src/wp-includes/author-template.php b/src/wp-includes/author-template.php index b73d84dadc..210ed68137 100644 --- a/src/wp-includes/author-template.php +++ b/src/wp-includes/author-template.php @@ -288,12 +288,12 @@ function the_author_posts() { * * @global object $authordata The current author's DB object. * - * @return string An HTML link to the author page. + * @return string An HTML link to the author page, or an empty string if $authordata isn't defined. */ function get_the_author_posts_link() { global $authordata; if ( ! is_object( $authordata ) ) { - return; + return ''; } $link = sprintf(