[buddypress-trac] [BuddyPress] #4302: bp_get_loggedin_user_nav() uses undefined key ( on file bp-members-template.php)
buddypress-trac at lists.automattic.com
buddypress-trac at lists.automattic.com
Tue Jun 26 10:00:02 UTC 2012
#4302: bp_get_loggedin_user_nav() uses undefined key ( on file bp-members-
template.php)
--------------------------+-----------------------------
Reporter: rbahumi | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Members | Version:
Severity: minor | Keywords:
--------------------------+-----------------------------
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'] ){
}}}
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4302>
BuddyPress <http://buddypress.org/>
BuddyPress
More information about the buddypress-trac
mailing list