Skip to:
Content

BuddyPress.org

Opened 14 years ago

Closed 14 years ago

#2267 closed defect (bug) (fixed)

$post_id in bp_forums_new_post action always returns false

Reported by: cnorris23's profile cnorris23 Owned by:
Milestone: 1.2.4 Priority: major
Severity: Version:
Component: Core Keywords: has-patch
Cc:

Description

$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.

Attachments (1)

2267.001.diff (998 bytes) - added by cnorris23 14 years ago.

Download all attachments as: .zip

Change History (2)

@cnorris23
14 years ago

#1 @johnjamesjacoby
14 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [2893]) Fixes #2267 props cnorris23

Note: See TracTickets for help on using tickets.