mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-04 06:37:06 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@46966 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -208,6 +208,8 @@ class Tests_Functions extends WP_UnitTestCase {
|
||||
// Test collision with existing sub-size filename.
|
||||
// Existing files: one-blue-pixel-100x100.png, one-blue-pixel-1-100x100.png.
|
||||
$this->assertEquals( 'one-blue-pixel-2.png', wp_unique_filename( $testdir, 'one-blue-pixel.png' ) );
|
||||
// Same as above with upper case extension.
|
||||
$this->assertEquals( 'one-blue-pixel-2.png', wp_unique_filename( $testdir, 'one-blue-pixel.PNG' ) );
|
||||
|
||||
remove_filter( 'upload_dir', array( $this, 'upload_dir_patch_basedir' ) );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user