Check to see if we have an author before displaying it. See #9948.

git-svn-id: https://develop.svn.wordpress.org/trunk@11471 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Peter Westwood 2009-05-27 21:51:25 +00:00
parent 2e2d842ff0
commit ae8e3e6593

View File

@ -823,8 +823,10 @@ function wp_widget_rss_output( $rss, $args = array() ) {
$author = '';
if ( $show_author ) {
$author = $item->get_author();
$author = $author->get_name();
$author = ' <cite>' . esc_html( strip_tags( $author ) ) . '</cite>';
if ( is_object($author) ) {
$author = $author->get_name();
$author = ' <cite>' . esc_html( strip_tags( $author ) ) . '</cite>';
}
}
if ( $link == '' ) {