mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 21:00:21 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@46144 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -3561,7 +3561,7 @@ class WP_Query {
|
||||
*/
|
||||
public function __call( $name, $arguments ) {
|
||||
if ( in_array( $name, $this->compat_methods ) ) {
|
||||
return call_user_func_array( array( $this, $name ), $arguments );
|
||||
return $this->$name( ...$arguments );
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user