Ticket #6450: file_upload_move_error.patch
| File file_upload_move_error.patch, 700 bytes (added by , 18 years ago) |
|---|
-
wp-admin/includes/file.php
old new 172 172 173 173 // Move the file to the uploads dir 174 174 $new_file = $uploads['path'] . "/$filename"; 175 if ( false === @ move_uploaded_file( $file['tmp_name'], $new_file ) ) 176 wp_die( printf( __('The uploaded file could not be moved to %s.' ), $uploads['path'] )); 175 if ( false === @ move_uploaded_file( $file['tmp_name'], $new_file ) ) { 176 return $upload_error_handler( $file, sprintf( __('The uploaded file could not be moved to %s.' ), $uploads['path'] ) ); 177 } 177 178 178 179 // Set correct file permissions 179 180 $stat = stat( dirname( $new_file ));