Make WordPress Core

Changeset 11570


Ignore:
Timestamp:
06/15/2009 04:57:35 PM (16 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

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

    r11450 r11570  
    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.