Changeset 42525
- Timestamp:
- 01/17/2018 07:15:57 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/file.php
r42343 r42525 779 779 } 780 780 781 // A properly uploaded file will pass this test. There should be no reason to override this one. 782 $test_uploaded_file = 'wp_handle_upload' === $action ? @ is_uploaded_file( $file['tmp_name'] ) : @ is_readable( $file['tmp_name'] ); 783 if ( ! $test_uploaded_file ) { 784 return call_user_func_array( $upload_error_handler, array( &$file, __( 'Specified file failed upload test.' ) ) ); 785 } 786 781 787 $test_file_size = 'wp_handle_upload' === $action ? $file['size'] : filesize( $file['tmp_name'] ); 782 788 // A non-empty file will pass this test. … … 788 794 } 789 795 return call_user_func_array( $upload_error_handler, array( &$file, $error_msg ) ); 790 }791 792 // A properly uploaded file will pass this test. There should be no reason to override this one.793 $test_uploaded_file = 'wp_handle_upload' === $action ? @ is_uploaded_file( $file['tmp_name'] ) : @ is_file( $file['tmp_name'] );794 if ( ! $test_uploaded_file ) {795 return call_user_func_array( $upload_error_handler, array( &$file, __( 'Specified file failed upload test.' ) ) );796 796 } 797 797
Note: See TracChangeset
for help on using the changeset viewer.