WordPress.org

Make WordPress Core

Changeset 50499


Ignore:
Timestamp:
03/05/2021 11:01:54 AM (7 months ago)
Author:
SergeyBiryukov
Message:

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.
Fixes #52524.

File:
1 edited

Legend:

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

    r50353 r50499  
    66506650    public function mt_supportedMethods() {
    66516651        /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
    6652         do_action( 'xmlrpc_call', 'mt.supportedMethods', $args, $this );
     6652        do_action( 'xmlrpc_call', 'mt.supportedMethods', array(), $this );
    66536653
    66546654        return array_keys( $this->methods );
     
    66626662    public function mt_supportedTextFilters() {
    66636663        /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
    6664         do_action( 'xmlrpc_call', 'mt.supportedTextFilters', $args, $this );
     6664        do_action( 'xmlrpc_call', 'mt.supportedTextFilters', array(), $this );
    66656665
    66666666        /**
Note: See TracChangeset for help on using the changeset viewer.