Make WordPress Core

Ticket #58348: 58348.patch

File 58348.patch, 1.1 KB (added by pkbhatt, 2 years ago)

Patch for the ticket 58348

  • src/wp-includes/functions.php

    diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php
    index 52c447d996..f20ba84d76 100644
    a b function wp_get_default_extension_for_mime_type( $mime_type ) { 
    30123012 *
    30133013 * @since 2.0.4
    30143014 *
    3015  * @param string   $filename File name or path.
    3016  * @param string[] $mimes    Optional. Array of allowed mime types keyed by their file extension regex.
     3015 * @param string $filename File name or path.
     3016 * @param array $mimes    Optional. Array of allowed mime types keyed by their file extension regex.
    30173017 *                           Defaults to the result of get_allowed_mime_types().
    30183018 * @return array {
    30193019 *     Values for the extension and mime type.
    function wp_get_default_extension_for_mime_type( $mime_type ) { 
    30223022 *     @type string|false $type File mime type, or false if the file doesn't match a mime type.
    30233023 * }
    30243024 */
    3025 function wp_check_filetype( $filename, $mimes = null ) {
     3025function wp_check_filetype( $filename, $mimes = array() ) {
    30263026        if ( empty( $mimes ) ) {
    30273027                $mimes = get_allowed_mime_types();
    30283028        }