XML-RPC: Pass an empty array to the xmlrpc_call action in methods that have no arguments.

This avoids an "Undefined variable" PHP notice in the `::mt_supportedMethods()` and `::mt_supportedTextFilters()` methods.

Follow-up to [50353].

Props dd32.
Reviewed by dd32, SergeyBiryukov.
Merges [50499] to the 5.7 branch.
Fixes #52524.

git-svn-id: https://develop.svn.wordpress.org/branches/5.7@50500 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2021-03-05 11:04:47 +00:00
parent c977b75c27
commit 9df89e8baa

View File

@ -6649,7 +6649,7 @@ class wp_xmlrpc_server extends IXR_Server {
*/
public function mt_supportedMethods() {
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action( 'xmlrpc_call', 'mt.supportedMethods', $args, $this );
do_action( 'xmlrpc_call', 'mt.supportedMethods', array(), $this );
return array_keys( $this->methods );
}
@ -6661,7 +6661,7 @@ class wp_xmlrpc_server extends IXR_Server {
*/
public function mt_supportedTextFilters() {
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action( 'xmlrpc_call', 'mt.supportedTextFilters', $args, $this );
do_action( 'xmlrpc_call', 'mt.supportedTextFilters', array(), $this );
/**
* Filters the MoveableType text filters list for XML-RPC.