Opened 15 years ago
Closed 15 years ago
#826 closed defect (bug) (no action required)
bp_core_remove_nav_item bug?
Reported by: | wimble | Owned by: | |
---|---|---|---|
Milestone: | Priority: | major | |
Severity: | Version: | ||
Component: | Keywords: | ||
Cc: |
Description
I believe there may be a typo/bug in the bp_core_remove_nav_item function. On line 495 of bp-core.php, the foreach loop refers to the $bp->bp_users_nav array. Inside this loop it tries to unset the value for $bp->bp_nav array. I believe it's meant to unset the value for the $bp->bp_users_nav array since the other is unset in the foreach loop above (line 491).
foreach( (array) $bp->bp_users_nav as $item_key => $item_value ) { if ( $item_value['name'] == $name ) { unset( $bp->bp_nav[$item_key] ); <--- This line } }
Note: See
TracTickets for help on using
tickets.
Nice find, but not a bug. They are in fact two separate arrays doing two separate things. You will find references to both of them in different places.
Keep your eyes open though!