WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/15/2019 11:53:01 AM (3 months ago)
Author:
SergeyBiryukov
Message:

Code Modernisation: Replace call_user_func_array() in various __call() methods with dynamic function calls.

The callback in these functions is always checked against a limited list of valid callbacks that can be safely changed to dynamic function calls.

Props jrf.
See #47678.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-roles.php

    r42870 r46144  
    102102    public function __call( $name, $arguments ) {
    103103        if ( '_init' === $name ) {
    104             return call_user_func_array( array( $this, $name ), $arguments );
     104            return $this->_init( ...$arguments );
    105105        }
    106106        return false;
Note: See TracChangeset for help on using the changeset viewer.