WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/04/2012 08:00:16 PM (9 years ago)
Author:
ryan
Message:

Objects no longer need to be explicitly passed by ref to call_user_func*() to be callable. Props wonderboymusic. fixes #21865

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/capabilities.php

    r22060 r22118  
    726726        //Filter out caps that are not role names and assign to $this->roles
    727727        if ( is_array( $this->caps ) )
    728             $this->roles = array_filter( array_keys( $this->caps ), array( &$wp_roles, 'is_role' ) );
     728            $this->roles = array_filter( array_keys( $this->caps ), array( $wp_roles, 'is_role' ) );
    729729
    730730        //Build $allcaps from role caps, overlay user's $caps
     
    13321332    $args = array_merge( array( $capability ), $args );
    13331333
    1334     return call_user_func_array( array( &$author, 'has_cap' ), $args );
     1334    return call_user_func_array( array( $author, 'has_cap' ), $args );
    13351335}
    13361336
     
    13541354    $args = array_merge( array( $capability ), $args );
    13551355
    1356     return call_user_func_array( array( &$user, 'has_cap' ), $args );
     1356    return call_user_func_array( array( $user, 'has_cap' ), $args );
    13571357}
    13581358
Note: See TracChangeset for help on using the changeset viewer.