Changeset 38235
- Timestamp:
- 08/09/2016 09:53:12 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/file.php
r38151 r38235 271 271 // You may have had one or more 'wp_handle_upload_prefilter' functions error out the file. Handle that gracefully. 272 272 if ( isset( $file['error'] ) && ! is_numeric( $file['error'] ) && $file['error'] ) { 273 return $upload_error_handler( $file, $file['error']);273 return ); 274 274 } 275 275 … … 313 313 // A correct form post will pass this test. 314 314 if ( $test_form && ( ! isset( $_POST['action'] ) || ( $_POST['action'] != $action ) ) ) { 315 return call_user_func ( $upload_error_handler, $file, __( 'Invalid form submission.') );315 return call_user_func ) ); 316 316 } 317 317 // A successful upload will pass this test. It makes no sense to override this one. 318 318 if ( isset( $file['error'] ) && $file['error'] > 0 ) { 319 return call_user_func ( $upload_error_handler, $file, $upload_error_strings[ $file['error'] ]);319 return call_user_func ); 320 320 } 321 321 … … 328 328 $error_msg = __( 'File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your php.ini or by post_max_size being defined as smaller than upload_max_filesize in php.ini.' ); 329 329 } 330 return call_user_func ( $upload_error_handler, $file, $error_msg);330 return call_user_func ); 331 331 } 332 332 … … 334 334 $test_uploaded_file = 'wp_handle_upload' === $action ? @ is_uploaded_file( $file['tmp_name'] ) : @ is_file( $file['tmp_name'] ); 335 335 if ( ! $test_uploaded_file ) { 336 return call_user_func ( $upload_error_handler, $file, __( 'Specified file failed upload test.') );336 return call_user_func ) ); 337 337 } 338 338 … … 349 349 } 350 350 if ( ( ! $type || !$ext ) && ! current_user_can( 'unfiltered_upload' ) ) { 351 return call_user_func ( $upload_error_handler, $file, __( 'Sorry, this file type is not permitted for security reasons.') );351 return call_user_func ) ); 352 352 } 353 353 if ( ! $type ) { … … 363 363 */ 364 364 if ( ! ( ( $uploads = wp_upload_dir( $time ) ) && false === $uploads['error'] ) ) { 365 return call_user_func ( $upload_error_handler, $file, $uploads['error']);365 return call_user_func ); 366 366 } 367 367
Note: See TracChangeset
for help on using the changeset viewer.