[buddypress-trac] [BuddyPress] #935: bp_get_post_id() echoing id rather than returning current post id

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Sun Aug 23 11:34:44 UTC 2009


#935: bp_get_post_id() echoing id rather than returning current post id
---------------------------+------------------------------------------------
Reporter:  sbrajesh        |       Owner:     
    Type:  defect          |      Status:  new
Priority:  minor           |   Milestone:     
Keywords:  bp_get_post_id  |  
---------------------------+------------------------------------------------
 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

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


More information about the buddypress-trac mailing list