mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 17:48:01 +01:00
Fix fatal error in incoming links dashboard module when author not defined. Props jikamens. fixes #10162 for trunk
git-svn-id: http://svn.automattic.com/wordpress/trunk@11569 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8ffd022581
commit
547996eb20
@ -644,10 +644,14 @@ function wp_dashboard_incoming_links_output() {
|
|||||||
$link = esc_url( strip_tags( $item->get_link() ) );
|
$link = esc_url( strip_tags( $item->get_link() ) );
|
||||||
|
|
||||||
$author = $item->get_author();
|
$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() ) ) )
|
if ( !$publisher = esc_html( strip_tags( $author->get_name() ) ) )
|
||||||
$publisher = __( 'Somebody' );
|
$publisher = __( 'Somebody' );
|
||||||
|
} else {
|
||||||
|
$publisher = __( 'Somebody' );
|
||||||
|
}
|
||||||
if ( $site_link )
|
if ( $site_link )
|
||||||
$publisher = "<a href='$site_link'>$publisher</a>";
|
$publisher = "<a href='$site_link'>$publisher</a>";
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user