Skip to:
Content

bbPress.org


Ignore:
Timestamp:
04/15/2012 09:16:39 PM (14 years ago)
Author:
nacin
Message:

Port [3794], [3795] from trunk to branches/1.1.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.1/bb-includes/functions.bb-template.php

    r3846 r3847  
    12241224    $topic = get_topic( get_topic_id( $id ) );
    12251225    $first_post = bb_get_first_post( $topic );
    1226     $user_display_name = get_post_author( $first_post->post_id );
     1226    if ( !empty( $first_post ) ) {
     1227        $user_display_name = get_post_author( $first_post->post_id );
     1228    } else {
     1229        $user_display_name = $topic->topic_poster_name;
     1230    }
    12271231    return apply_filters( 'get_topic_author', $user_display_name, $topic->topic_poster, $topic->topic_id ); // $topic->topic_poster = user ID
    12281232}
Note: See TracChangeset for help on using the changeset viewer.