mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-30 23:30:05 +00:00
Media: Use a consistent error message for file type errors on uploading.
Props pavelevap, jackreichert. Fixes #33242. git-svn-id: https://develop.svn.wordpress.org/trunk@39891 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -2139,7 +2139,7 @@ function wp_upload_bits( $name, $deprecated, $bits, $time = null ) {
|
||||
|
||||
$wp_filetype = wp_check_filetype( $name );
|
||||
if ( ! $wp_filetype['ext'] && ! current_user_can( 'unfiltered_upload' ) )
|
||||
return array( 'error' => __( 'Invalid file type' ) );
|
||||
return array( 'error' => __( 'Sorry, this file type is not permitted for security reasons.' ) );
|
||||
|
||||
$upload = wp_upload_dir( $time );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user