Make WordPress Core

Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#6450 closed defect (bug) (fixed)

wp_handle_upload does not appear to handle file move errors correctly

Reported by: simonwheatley's profile simonwheatley Owned by: andy's profile andy
Milestone: 2.5.1 Priority: normal
Severity: normal Version: 2.5
Component: General Keywords: has-patch needs-testing
Focuses: Cc:

Description

wp_handle_upload uses a configurable error handler for all errors, except in the case where it fails to move the file to the uploads directory. I think this is an ommission, which the attached patch fixes. The patch also corrects an instance of printf to sprintf.

To reproduce:

  1. Set your upload directory & subdirectories to readonly (chmod -R 444 /your/uploads/)
  1. Attempt to upload a file through the 2.5 SWF uploader
  1. Observe the generic error message "An error occurred in the upload. Please try again later."

Attachments (1)

file_upload_move_error.patch (700 bytes) - added by simonwheatley 16 years ago.
Patch to fix uploaded file movement error notification

Download all attachments as: .zip

Change History (6)

@simonwheatley
16 years ago

Patch to fix uploaded file movement error notification

#1 @AaronCampbell
16 years ago

  • Keywords has-patch needs-testing added; has_patch needs_testing removed

The keywords use hyphens rather than underscores. I fixed it, but here is a link to look up keywords:
http://codex.wordpress.org/Reporting_Bugs#Trac_Keywords

#2 @ryan
16 years ago

  • Owner changed from anonymous to andy

#3 @simonwheatley
16 years ago

Thanks Aaron. I did read that page, but then my brain obviously switched off and I ended up with typos!

#4 @ryan
16 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [7643]) Use error handler instead of die when moving files to upload dir fails. Props simonwheatley. fixes #6450 for 2.5

#5 @ryan
16 years ago

(In [7644]) Use error handler instead of die when moving files to upload dir fails. Props simonwheatley. fixes #6450 for trunk

Note: See TracTickets for help on using tickets.