Opened 8 years ago
Closed 8 years ago
#7925 closed defect (bug) (fixed)
Nouveau: $this inside a closure doesn't work in PHP 5.3
| Reported by: | boonebgorges | Owned by: | boonebgorges |
|---|---|---|---|
| Priority: | high | Milestone: | 3.2.0 |
| Component: | Templates | Version: | 3.0.0 |
| Severity: | normal | Keywords: | has-patch |
| Cc: |
Description
Prior to PHP 5.3, $this references do not inside of a closure that appears in a class method. See eg https://buddypress.trac.wordpress.org/browser/tags/3.1.0/src/bp-templates/bp-nouveau/includes/groups/loader.php?annotate=blame&marks=58#L56
This needs to be refactored out, here and anywhere else that a similar construction is used.
Attachments (1)
Change History (3)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Gah, you can blame me for this.
Attached patch replaces
$thiswith thebp_nouveau()singleton function, which should address this issue. I don't have a PHP 5.3 rig to test this on at the moment, but it works in PHP 7.2.