Make WordPress Core

Ticket #37731: 37731.6.patch

File 37731.6.patch, 1.8 KB (added by gitlost, 5 years ago)

Explicitly specify actions take 0 args when adding them back (includes 37731.4.patch).

  • src/wp-admin/includes/class-language-pack-upgrader.php

     
    282282
    283283                // Re-add upgrade hooks.
    284284                add_action( 'upgrader_process_complete', array( 'Language_Pack_Upgrader', 'async_upgrade' ), 20 );
    285                 add_action( 'upgrader_process_complete', 'wp_version_check' );
    286                 add_action( 'upgrader_process_complete', 'wp_update_plugins' );
    287                 add_action( 'upgrader_process_complete', 'wp_update_themes' );
     285                add_action( 'upgrader_process_complete', 'wp_version_check', 10, 0 );
     286                add_action( 'upgrader_process_complete', 'wp_update_plugins', 10, 0 );
     287                add_action( 'upgrader_process_complete', 'wp_update_themes', 10, 0 );
    288288
    289289                $this->skin->bulk_footer();
    290290
  • src/wp-includes/functions.php

     
    28712871 * @return string|false The JSON encoded string, or false if it cannot be encoded.
    28722872 */
    28732873function wp_json_encode( $data, $options = 0, $depth = 512 ) {
     2874        // Prepare the data for JSON serialization.
     2875        $data = _wp_json_prepare_data( $data );
     2876
    28742877        /*
    28752878         * json_encode() has had extra params added over the years.
    28762879         * $options was added in 5.3, and $depth in 5.5.
     
    28842887                $args = array( $data );
    28852888        }
    28862889
    2887         // Prepare the data for JSON serialization.
    2888         $args[0] = _wp_json_prepare_data( $data );
    28892890
    28902891        $json = @call_user_func_array( 'json_encode', $args );
    28912892
     
    28972898        }
    28982899
    28992900        try {
    2900                 $args[0] = _wp_json_sanity_check( $data, $depth );
     2901                $args[0] = _wp_json_sanity_check( $args[0], $depth );
    29012902        } catch ( Exception $e ) {
    29022903                return false;
    29032904        }