#4302 closed defect (bug) (fixed)
bp_get_loggedin_user_nav() uses undefined key ( on file bp-members-template.php)
Reported by: | rbahumi | Owned by: | |
---|---|---|---|
Milestone: | 1.6 | Priority: | normal |
Severity: | minor | Version: | |
Component: | Members | Keywords: | |
Cc: |
Description
Hi,
When I navigated to the 'Home' page at my local BuddyPress installation (I am working in DEBUG mode), I received and 'Notice' message regarding an undefined key.
Make a long story short - the '$bp->current_component' is not defined for regular pages, and the bp_get_loggedin_user_nav() function (line 710) doesn't check that:
if ( !bp_is_directory() && $bp->active_components[$bp->current_component] == $nav_item['css_id'] ){
So, I've added another check to the 'if' statement:
if ( !bp_is_directory() && !empty( $bp->current_component ) && $bp->active_components[$bp->current_component] == $nav_item['css_id'] ){
Attachments (1)
Change History (6)
#1
@
12 years ago
- Milestone changed from Awaiting Review to 1.6
bp_get_loggedin_user_nav() is not used anymore in BP core, which is why we've never noticed :) It must be called in your custom theme. But this is a fine fix.
#3
@
12 years ago
Hi@boonebgorges,
Just downloaded the last BuddyPress release, and I still see the issue.
I am not familiar with your way of work, but this issue is reported as fixed both here, and on the 6152...
Does "fixed" means that the only the next update will include this change?
Thanks,
Roei
#4
@
12 years ago
'fixed' means that the fix has been put into our source code repository. In this case, the fix was placed into the 'trunk', or the development version of the software. This will be available in the official release as of version 1.6. If you don't want to wait, you can download the latest bleeding-edge version of the trunk by using Subversion:
svn co http://buddypress.trac.wordpress.org/trunk /local/path/to/wordpress/wp-content/plugins/buddypress/
#5
@
12 years ago
Just wanted a clarification in that.
Thank you for your quick response.
Roei.
This is the file after my small change