Opened 7 years ago
Closed 7 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 |
---|---|---|---|
Milestone: | 3.2.0 | Priority: | high |
Severity: | normal | Version: | 3.0.0 |
Component: | Templates | 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.
Gah, you can blame me for this.
Attached patch replaces
$this
with 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.