Opened 17 years ago
Closed 17 years ago
#826 closed defect (bug) (no action required)
bp_core_remove_nav_item bug?
| Reported by: | wimble | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | Version: | ||
| Severity: | 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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!