Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
07/17/2011 09:47:00 PM (14 years ago)
Author:
boonebgorges
Message:

Cast the current_comment as the activity item within certain Activity Loop template functions, to avoid PHP notices. Fixes #3341

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-activity/bp-activity-functions.php

    r4654 r4674  
    923923        $activity_obj = new BP_Activity_Activity( $activity_id );
    924924
     925    if ( isset( $activity_obj->current_comment ) ) {
     926        $activity_obj = $activity_obj->current_comment;
     927    }
     928   
    925929    if ( 'new_blog_post' == $activity_obj->type || 'new_blog_comment' == $activity_obj->type || 'new_forum_topic' == $activity_obj->type || 'new_forum_post' == $activity_obj->type )
    926930        $link = $activity_obj->primary_link;
Note: See TracChangeset for help on using the changeset viewer.