Opened 16 years ago
Closed 12 years ago
#10568 closed enhancement (wontfix)
wp_upload_dir should return a WP_Error object on failure
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.9 |
Component: | Upload | Keywords: | has-patch 2nd-opinion |
Focuses: | Cc: |
Description
Currently wp_upload_dir returns an array with an 'error' index. I believe it should return a WP_Error object instead. The attached patch amends the behaviour.
Attachments (1)
Change History (4)
#1
follow-up:
↓ 2
@
16 years ago
- Component changed from Filesystem to Upload
- Keywords 2nd-opinion added
- Milestone changed from Unassigned to Future Release
- Owner dd32 deleted
- Type changed from defect (bug) to enhancement
- Version set to 2.9
I do agree with you, But a LOT of plugins are written expecting an error element as a return, some do not even bother checking for that case too..
Note: See
TracTickets for help on using
tickets.
Patch to have wp_upload_dir return a WP_Error object on failure to create the dir