#6450 closed defect (bug) (fixed)
wp_handle_upload does not appear to handle file move errors correctly
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 2.5.1 |
| Component: | General | Version: | 2.5 |
| Severity: | normal | Keywords: | has-patch needs-testing |
| 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:
- Set your upload directory & subdirectories to readonly (chmod -R 444 /your/uploads/)
- Attempt to upload a file through the 2.5 SWF uploader
- Observe the generic error message "An error occurred in the upload. Please try again later."
Attachments (1)
Change History (6)
simonwheatley
— 5 years ago
comment:1
AaronCampbell
— 5 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
comment:3
simonwheatley
— 5 years ago
Thanks Aaron. I did read that page, but then my brain obviously switched off and I ended up with typos!
Note: See
TracTickets for help on using
tickets.
Patch to fix uploaded file movement error notification