Make WordPress Core

Ticket #58349: 58349.patch

File 58349.patch, 705 bytes (added by pkbhatt, 13 months ago)

Added patch for the bug

  • src/wp-admin/includes/file.php

    diff --git a/src/wp-admin/includes/file.php b/src/wp-admin/includes/file.php
    index af88fe023f..a43c5ca64e 100644
    a b function _wp_handle_upload( &$file, $overrides, $time, $action ) { 
    890890
    891891        // If you override this, you must provide $ext and $type!!
    892892        $test_type = isset( $overrides['test_type'] ) ? $overrides['test_type'] : true;
    893         $mimes     = isset( $overrides['mimes'] ) ? $overrides['mimes'] : false;
     893        $mimes     = isset( $overrides['mimes'] ) ? $overrides['mimes'] : null;
    894894
    895895        // A correct form post will pass this test.
    896896        if ( $test_form && ( ! isset( $_POST['action'] ) || $_POST['action'] !== $action ) ) {