Opened 7 years ago
Closed 3 years ago
#38119 closed defect (bug) (wontfix)
File is not getting uploaded if the error field in $uploads array is blank
Reported by: | PranaliPatel | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.6.1 |
Component: | Upload | Keywords: | has-patch close reporter-feedback |
Focuses: | Cc: |
Description
Hello,
$uploads variable ( at wordpress/wp-admin/includes/file.php - line number - 364) contains below array values when user uploads the file.
Array ( [path] => /path/to/your/file [url] => /url [subdir] => /2010/05 [basedir] => /path/to/wordpress/wp-content/uploads [baseurl] => http://example.com/wp-content/uploads [error] => )
If the [error] field contains empty value then the file won't be uploaded because it checks for the below condition :
false === $uploads['error']
Attachments (2)
Change History (6)
#2
@
7 years ago
- Keywords close added
Hi @PranaliPatel, thanks for the patch. As far as I see $uploads['error']
is checking the type. The default is false
and anything else, including ''
, null
, etc. would mean something may be wrong. As this is used by low level plugins that tweak the upload location(s), not sure we can change it without risk of breaking something. Also, is there a compelling user case to justify such change?
#3
@
3 years ago
- Keywords reporter-feedback added
Hello @PranaliPatel,
Pinging you to continue discussions on this ticket. What do you think is a "compelling user case to justify such change?"
As Ozz notes, the false
value is intentional, ie design decision. Anything other than this might indicate a problem or be a breaking change.
#4
@
3 years ago
- Milestone Awaiting Review deleted
- Resolution set to wontfix
- Status changed from new to closed
It's been 5 months with no report follow-up. As previously noted, the design is intentional and the reported values indicate a problem.
Support forum may be a better outlet to help if the problem still exists today.
Here is the patch.