Make WordPress Core


Ignore:
Timestamp:
12/16/2019 11:42:34 PM (5 years ago)
Author:
azaozz
Message:

Upload: Fix the final file name collision test in wp_unique_filename() when uploading a file with upper case extension. Add a unit test to catch that in the future.

Fixes #48975 for trunk.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/functions.php

    r46965 r46966  
    209209        // Existing files: one-blue-pixel-100x100.png, one-blue-pixel-1-100x100.png.
    210210        $this->assertEquals( 'one-blue-pixel-2.png', wp_unique_filename( $testdir, 'one-blue-pixel.png' ) );
     211        // Same as above with upper case extension.
     212        $this->assertEquals( 'one-blue-pixel-2.png', wp_unique_filename( $testdir, 'one-blue-pixel.PNG' ) );
    211213
    212214        remove_filter( 'upload_dir', array( $this, 'upload_dir_patch_basedir' ) );
Note: See TracChangeset for help on using the changeset viewer.