Make WordPress Core


Ignore:
Timestamp:
09/15/2019 11:53:01 AM (6 years 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-user.php

    r45623 r46144  
    445445    public function __call( $name, $arguments ) {
    446446        if ( '_init_caps' === $name ) {
    447             return call_user_func_array( array( $this, $name ), $arguments );
     447            return $this->_init_caps( ...$arguments );
    448448        }
    449449        return false;
Note: See TracChangeset for help on using the changeset viewer.