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-comment-query.php

    r46087 r46144  
    125125    public function __call( $name, $arguments ) {
    126126        if ( 'get_search_sql' === $name ) {
    127             return call_user_func_array( array( $this, $name ), $arguments );
     127            return $this->get_search_sql( ...$arguments );
    128128        }
    129129        return false;
Note: See TracChangeset for help on using the changeset viewer.