WordPress.org

Make WordPress Core

Changeset 11569


Ignore:
Timestamp:
06/15/2009 04:56:51 PM (9 years ago)
Author:
ryan
Message:

Fix fatal error in incoming links dashboard module when author not defined. Props jikamens. fixes #10162 for trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/dashboard.php

    r11450 r11569  
    645645
    646646        $author = $item->get_author();
    647         $site_link = esc_url( strip_tags( $author->get_link() ) );
    648 
    649         if ( !$publisher = esc_html( strip_tags( $author->get_name() ) ) )
    650             $publisher = __( 'Somebody' );
     647        if ( $author ) {
     648            $site_link = esc_url( strip_tags( $author->get_link() ) );
     649
     650            if ( !$publisher = esc_html( strip_tags( $author->get_name() ) ) )
     651                $publisher = __( 'Somebody' );
     652        } else {
     653          $publisher = __( 'Somebody' );
     654        }
    651655        if ( $site_link )
    652656            $publisher = "<a href='$site_link'>$publisher</a>";
Note: See TracChangeset for help on using the changeset viewer.