Handle 'emptyfile' error, and in particular, investigate why this is different from 'empty-file' that we already handle.
Description
Details
Project | Branch | Lines +/- | Subject | |
---|---|---|---|---|
mediawiki/core | master | +1 -1 | UploadBase: Replace 'emptyfile' warning code by 'empty-file' |
Related Objects
Event Timeline
I think this warning code is a bug and everything should consistently use 'empty-file' instead. The only way to make 'emptyfile' happen is to somehow get a zero-length file into upload stash (which is impossible, as both frontends [special page and API module] and the upload backend actively reject zero-length files), so this is realistically not going to be a breaking change, but technically it does change the API output. A legit 'empty-file' is returned from the API as an error (not a warning) when trying to upload an empty file, and potentially also as a warning but I couldn't find a way to trigger this.
Change 279310 had a related patch set uploaded (by Bartosz Dziewoński):
UploadBase: Replace 'emptyfile' warning code by 'empty-file'
Change 279310 merged by jenkins-bot:
UploadBase: Replace 'emptyfile' warning code by 'empty-file'