On current HEAD with user pictures enabled, if you submit the user edit account page without specifying a user picture upload file, you get an error message that says "The file picture_upload could not be saved, because the upload did not complete." This seems very wrong considering when this appears, the user never wanted an uploaded file.

CommentFileSizeAuthor
#1 357832-empty-upload-error-D7.patch542 bytesdave reid

Comments

dave reid’s picture

StatusFileSize
new542 bytes

When a form has a file upload element, but the user does not specify a file, $_FILES['files']['name'][$source] is set and equal to an empty string, so a change from !isset() to empty() is needed.

dave reid’s picture

dave reid’s picture

Status: Needs review » Closed (duplicate)

Nevermind, realized that #30520: file_save_upload() not notifying user when PHP upload limit is exceeded. has been re-opened as a duplicate of this issue.