Opened 15 years ago
Closed 13 years ago
#3886 closed defect (bug) (fixed)
Audit class methods and mark appropriately as static
| Reported by: | kayue | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.9 |
| Component: | Core | Version: | |
| Severity: | normal | Keywords: | needs-patch |
| Cc: |
Description (last modified by )
Non-static method BP_Core_Notification::get_all_for_user() should not be called statically in /buddypress/bp-members/bp-members-notifications.php line 51
Change History (11)
#2
@
15 years ago
- Description modified (diff)
- Keywords 1.7-early added
- Milestone Awaiting Review → Future Release
- Summary Non-static method BP_Core_Notification::get_all_for_user() should not be called statically → Audit class methods and mark appropriately as static
We need to look at all of BuddyPress, and mark class methods as static where appropriate. There was a conversation on IRC (https://irclogs.wordpress.org/chanlog.php?channel=buddypress-dev&day=2011-12-21#m155663) between Spadeski and boonebgorges recently about the same thing.
#3
@
15 years ago
- Description modified (diff)
Marking this ticket for 1.7 so we can do all of these at the same time, and make sure we have plenty of time to check for any breakages.
#4
@
14 years ago
- Keywords 1.7-early removed
- Milestone Future Release → 1.7
- Priority normal → low
Moving to 1.7 for further review. Note that we have to make sure that marking items static doesn't break plugins that are extending our core classes, as PHP will throw a fit if you override a method without declaring access levels, etc properly.
#5
@
14 years ago
- Milestone 1.7 → 1.8
Going to move this to 1.8. There's no complaints or traction in 12 months, so we can iterate on this more in the future.
#6
@
13 years ago
- Component Notifications → Core
- Milestone 1.8 → Future Release
- Priority low → lowest
- Severity minor → trivial
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
To fix this, in bp-core-classes.php, should add a static keyword before declare the function.