#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 |
---|---|---|---|
Milestone: | 2.3 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Core | 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
@
10 years ago
- Component changed from API to Tools - Warnings/Notices
- Milestone changed from Awaiting Review to Future Release
- Type changed from defect (bug) to enhancement
- Version 2.2 deleted
#2
@
10 years ago
but as WP requires PHP >= 5.2, you should upgrade to a modern version of PHP ;)
Good advice :)
#3
@
10 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
@
10 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.
Sure. As you probably know,
var
is 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 ;)