#3414 closed defect (bug) (fixed)
Undefined index in BuddyBar
Reported by: | r-a-y | Owned by: | |
---|---|---|---|
Milestone: | 1.5 | Priority: | normal |
Severity: | normal | Version: | 1.5 |
Component: | Core | Keywords: | has-patch reporter-feedback |
Cc: |
Description
Attached patch addresses two undefined index notices in the BuddyBar.
Attachments (1)
Change History (7)
#3
@
13 years ago
- Keywords reporter-feedback added
- Milestone changed from Awaiting Review to 1.5
- Resolution fixed deleted
- Status changed from closed to reopened
Which part of the menu or item causes these? Is masking these errors cloaking a bug somewhere else?
#4
@
13 years ago
We don't use bp_core_remove_nav_item() internally, and we only use bp_core_remove_subnav_item() in an isolated incident where such a PHP notice would not arise. We provide them as convenience functions for plugin authors. And since the functions both take arbitrary string arguments, it's possible that the situation will arise where these isset() checks will be necessary.
I'm assuming r-a-y was testing with some plugins that use the functions. r-a-y, can you confirm one way or the other?
In any case, it's hard to see how these notices would signify any deeper problem in BP, since, as I say above, we don't use them.
#5
@
13 years ago
- Resolution set to fixed
- Status changed from reopened to closed
I don't see any problem in BP bar......some plugin may be causing the problem...
#6
@
13 years ago
Boone is right on the money; I had a small piece of code that was using bp_core_remove_subnav_item().
Full piece of offending code:
bp_core_remove_subnav_item( $bp->activity->slug, 'mentions' );
I guess I can check if the user is logged in before trying to remove the subnav item. That will fix the problem.
Forgot to add that these notices appear when you're not logged in.