[buddypress-trac] [BuddyPress] #2267: $post_id in bp_forums_new_post action always returns false

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Wed Mar 31 23:51:46 UTC 2010


#2267: $post_id in bp_forums_new_post action always returns false
-----------------------+----------------------------------------------------
 Reporter:  cnorris23  |       Owner:           
     Type:  defect     |      Status:  new      
 Priority:  major      |   Milestone:  1.2.4    
Component:  Core       |    Keywords:  has-patch
-----------------------+----------------------------------------------------
 {{{
 $post = bb_insert_post( array( 'post_id' => $post_id, 'topic_id' =>
 $topic_id, 'post_text' => stripslashes( trim( $post_text ) ), 'post_time'
 => $post_time, 'poster_id' => $poster_id, 'poster_ip' => $poster_ip,
 'post_status' => $post_status, 'post_position' => $post_position ) );

 if ( $post )
    do_action( 'bp_forums_new_post', $post_id );

 return $post;
 }}}

 The {{{bp_forums_new_post}}} action gives access to {{{$post_id}}}, but
 {{{$post_id}}} is never redefined from it's default value of 'false.' I've
 changed {{{$post}}} to {{{$post_id}}} to better reflect the what to expect
 from the variable, and properly return the expected value.

-- 
Ticket URL: <http://trac.buddypress.org/ticket/2267>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list