#6185 closed enhancement (fixed)
Usage of var keyword generates an E_STRICT warning when using PHP 5 before version 5.1.3
| Reported by: | henry.wright | Owned by: | DJPaul |
|---|---|---|---|
| Priority: | normal | Milestone: | 2.3 |
| Component: | Core | Version: | |
| Severity: | normal | Keywords: | has-patch |
| Cc: |
Description
Should declarations that use the var keyword be changed to public? I think they're treated as such.
An example can be seen in the BP_Activity_Activity class.
Attachments (1)
Change History (10)
#1
@
11 years ago
- Component API → Tools - Warnings/Notices
- Milestone Awaiting Review → Future Release
- Type defect (bug) → enhancement
- Version 2.2
#2
@
11 years ago
but as WP requires PHP >= 5.2, you should upgrade to a modern version of PHP ;)
Good advice :)
#3
@
11 years ago
Just been through BP. These are the classes that are affected:
- BP_XProfile_Component
- BP_Activity_Activity
- BP_XProfile_Data_Template
- BP_Groups_Template
- BP_Groups_Group_Members_Template
- BP_Forums_Template_Forum
- BP_Forums_Template_Topic
- BP_Core_Members_Template
- BP_Activity_Template
#4
@
11 years ago
- Keywords has-patch added
This is most probably a very low priority ticket, but, attached is 6185.diff which should eradicate the E_STRICT warning.
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Sure. As you probably know,
varis left-over from PHP 4. I think PHP added the warning in 5.0-ish but then removed it in a 5.2-ish release, which is why we haven't seen this before.We can fix these up because PHP4, but as WP requires PHP >= 5.2, you should upgrade to a modern version of PHP ;)