Ticket #37570: 37570.3.diff
File 37570.3.diff, 987 bytes (added by , 9 years ago) |
---|
-
src/wp-admin/includes/file.php
245 245 function _wp_handle_upload( &$file, $overrides, $time, $action ) { 246 246 // The default error handler. 247 247 if ( ! function_exists( 'wp_handle_upload_error' ) ) { 248 function wp_handle_upload_error( &$file, $message ) {248 function wp_handle_upload_error( $file, $message ) { 249 249 return array( 'error' => $message ); 250 250 } 251 251 } … … 270 270 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 call_user_func( $upload_error_handler, $file, $file['error'] ); 274 274 } 275 275 276 276 // Install user overrides. Did we mention that this voids your warranty?