Use JFile::upload in a way that causes an error.
Being able to check for errors after use.
Errors are only logged in log file, no exceptions or error return value.
N/A
I propose a static class variable called $upload_error, which is set to relevant error message (or object) if upload returns false.
Better would probably be throwing an exception, or returning a result array like [boolean $result, string $errorMessage], but that would break compatibility.
Link to method: https://github.com/joomla/joomla-cms/blob/staging/libraries/joomla/filesystem/file.php#L521
| Labels |
Added:
?
|
||
| Title |
|
||||||
| Category | ⇒ | Feature Request Libraries |
| Labels |
Added:
J3 Issue
|
||
| Status | New | ⇒ | Information Required |
The code is doing exactly as it is designed to. It is designed to return a bool only.
What this issue really is, is a new feature request, to allow the upload error to be captured and reported someway instead of just returning false.
Thanks @PhilETaylor for Answer.
So this Issue stay open as Feature Request.
| Status | Information Required | ⇒ | Discussion |
@PhilETaylor Haha, yes, I know it does that. That's the problem!! I can do a PR if you want to.
@olleharstedt Please submit a PR so it has a chance to be included in the core.
| Status | Discussion | ⇒ | Closed |
| Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-05-17 11:32:03 |
| Closed_By | ⇒ | franz-wohlkoenig |
| Closed_By | franz-wohlkoenig | ⇒ | joomla-cms-bot |
Set to "closed" on behalf of @franz-wohlkoenig by The JTracker Application at issues.joomla.org/joomla-cms/20246
Can someone please answer on this issue as its open since 10+ Days having Staus "New"?
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/20246.