WordPress.org

Make WordPress Core

Ticket #11620: file.diff

File file.diff, 622 bytes (added by markup, 4 years ago)
  • file.php

    old new  
    239239        $upload_error_handler = 'wp_handle_upload_error'; 
    240240 
    241241        // You may have had one or more 'wp_handle_upload_prefilter' functions error out the file.  Handle that gracefully. 
    242         if ( isset( $file['error'] ) && !ctype_digit( $file['error'] ) && $file['error'] ) 
     242        if ( isset( $file['error'] ) && !is_numeric( $file['error'] ) && $file['error'] ) 
    243243                return $upload_error_handler( $file, $file['error'] ); 
    244244 
    245245        // You may define your own function and pass the name in $overrides['unique_filename_callback']