file_check_upload returns successfully when an empty file is uploaded. this causes an error in getimagesize() (for example in profile.module's avatar code). to reproduce: using profile module with avatars enabled, enter 'xx' in the file upload box and submit the form. the getimagesize error will be reported since it can't process the file.

the attached one-liner just checks to see that the uploaded file is in fact non empty.

CommentFileSizeAuthor
file_check_upload.patch778 byteswalkah

Comments

dries’s picture