Skip to:
Content

BuddyPress.org

Opened 15 years ago

Closed 15 years ago

#935 closed defect (bug) (fixed)

bp_get_post_id() echoing id rather than returning current post id

Reported by: sbrajesh's profile sbrajesh Owned by:
Milestone: Priority: minor
Severity: Version:
Component: Keywords: bp_get_post_id
Cc:

Description

There is a minor bug in buddypress 1.0.3 and the nightly build,in bp-blogs components.

The function bp_get_post_id() is supposed to return the current post Id,but it echos the post ID.

Solution
In buddypress 1.0.3
Go to buddypress/bp-blogs/bp-blogs-templatetags.php
Change line number 522 from
echo apply_filters( 'bp_get_post_id', $posts_template->post->ID );

to
return apply_filters( 'bp_get_post_id', $posts_template->post->ID);

For nightly build apply this on line number 524.
Just remove echo and use return statement.

Hope it helps.
Thanks
Brajesh

Change History (1)

#1 @apeatling
15 years ago

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

(In [1771]) Fixes #935

Note: See TracTickets for help on using tickets.