Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
08/01/2013 12:06:38 AM (11 years ago)
Author:
boonebgorges
Message:

Define BP_Group_Extension screen callbacks non-statically

These callbacks should not be defined statically, because then the $this
keyword is not available in the callbacks. This causes backward compatibility
issues, especially with PHP 5.2.x, where it results in fatal errors.

Fixes #5126

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.8/bp-groups/bp-groups-classes.php

    r7323 r7333  
    25812581        $rmethod = $this->class_reflection->getMethod( $method );
    25822582        if ( isset( $rmethod->class ) && $this->class_name === $rmethod->class ) {
    2583             $callback = array( $this->class_name, $method );
     2583            $callback = array( $this, $method );
    25842584        }
    25852585
     
    25882588            $rfallback_method = $this->class_reflection->getMethod( $fallback_method );
    25892589            if ( isset( $rfallback_method->class ) && $this->class_name === $rfallback_method->class ) {
    2590                 $callback = array( $this->class_name, $fallback_method );
     2590                $callback = array( $this, $fallback_method );
    25912591            }
    25922592        }
Note: See TracChangeset for help on using the changeset viewer.