WordPress.org

Make WordPress Core

Changeset 20575


Ignore:
Timestamp:
04/24/12 14:41:23 (2 years ago)
Author:
nacin
Message:

Fix a notice in [20565] where get_the_author_meta() may be called prior to postdata from being set up. In this case, the function should return nothing (via the filter). props johnjamesjacoby. fixes #20529. see #20285.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/author-template.php

    r20565 r20575  
    100100    if ( ! $user_id ) { 
    101101        global $authordata; 
    102         $user_id = $authordata->ID; 
     102        $user_id = isset( $authordata->ID ) ? $authordata->ID : 0; 
    103103    } else { 
    104104        $authordata = get_userdata( $user_id ); 
Note: See TracChangeset for help on using the changeset viewer.