From cdd72d2b011e856c07d8a13994440f4c380e8061 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Mon, 15 Jun 2009 16:56:51 +0000 Subject: [PATCH] Fix fatal error in incoming links dashboard module when author not defined. Props jikamens. fixes #10162 for trunk git-svn-id: https://develop.svn.wordpress.org/trunk@11569 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/dashboard.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/wp-admin/includes/dashboard.php b/wp-admin/includes/dashboard.php index ec93fb0d09..5496528f5d 100644 --- a/wp-admin/includes/dashboard.php +++ b/wp-admin/includes/dashboard.php @@ -644,10 +644,14 @@ function wp_dashboard_incoming_links_output() { $link = esc_url( strip_tags( $item->get_link() ) ); $author = $item->get_author(); - $site_link = esc_url( strip_tags( $author->get_link() ) ); + if ( $author ) { + $site_link = esc_url( strip_tags( $author->get_link() ) ); - if ( !$publisher = esc_html( strip_tags( $author->get_name() ) ) ) - $publisher = __( 'Somebody' ); + if ( !$publisher = esc_html( strip_tags( $author->get_name() ) ) ) + $publisher = __( 'Somebody' ); + } else { + $publisher = __( 'Somebody' ); + } if ( $site_link ) $publisher = "$publisher"; else