Make WordPress Core


Ignore:
Timestamp:
01/12/2017 06:28:32 AM (8 years ago)
Author:
SergeyBiryukov
Message:

Media: Use a consistent error message for file type errors on uploading.

Props pavelevap, jackreichert.
Fixes #33242.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/functions.php

    r39850 r39891  
    21402140    $wp_filetype = wp_check_filetype( $name );
    21412141    if ( ! $wp_filetype['ext'] && ! current_user_can( 'unfiltered_upload' ) )
    2142         return array( 'error' => __( 'Invalid file type' ) );
     2142        return array( 'error' => __( 'Sorry, this file type is not permitted for security reasons.' ) );
    21432143
    21442144    $upload = wp_upload_dir( $time );
Note: See TracChangeset for help on using the changeset viewer.