Opened 17 years ago
Closed 17 years ago
#935 closed defect (bug) (fixed)
bp_get_post_id() echoing id rather than returning current post id
| Reported by: | sbrajesh | Owned by: | |
|---|---|---|---|
| Priority: | minor | Milestone: | |
| Component: | Version: | ||
| Severity: | 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
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
(In [1771]) Fixes #935