Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Missing FileUpload::isEmpty() #97

Merged
merged 1 commit into from Sep 27, 2016

Conversation

@JanTvrdik
Copy link
Contributor

JanTvrdik commented Aug 5, 2016

How do you feel about adding isEmpty() shortcut to FileUpload
defined as $this->error === UPLOAD_ERR_NO_FILE?

@rostenkowski

This comment has been minimized.

Copy link
Contributor

rostenkowski commented Aug 5, 2016

Seems useful to me.

@JanTvrdik

This comment has been minimized.

Copy link
Contributor Author

JanTvrdik commented Aug 5, 2016

Converted to PR

@Majkl578

This comment has been minimized.

Copy link
Contributor

Majkl578 commented Aug 5, 2016

I thought this is about checking whether the uploaded file is empty, until I read the description... So the name is confusing name imho.

@hrach

This comment has been minimized.

Copy link
Contributor

hrach commented Aug 5, 2016

What about isFilled()?

@SlavaAurim

This comment has been minimized.

Copy link

SlavaAurim commented Sep 8, 2016

Maybe noFile() (like constant name UPLOAD_ERR_NO_FILE)

@Majkl578

This comment has been minimized.

Copy link
Contributor

Majkl578 commented Sep 8, 2016

More options:

  • hasFile()
  • hasNoFile()
  • isFileMissing()
  • isFilePresent()
  • fileExists()
@dg

This comment has been minimized.

Copy link
Member

dg commented Sep 26, 2016

hasFile() seems perfect to me.

@JanTvrdik JanTvrdik force-pushed the JanTvrdik:pr/file_upload_is_empty branch from fc44509 to 0ce42e1 Sep 27, 2016
@dg

This comment has been minimized.

Copy link
Member

dg commented Sep 27, 2016

Thanks

@dg dg merged commit 2bce63b into nette:master Sep 27, 2016
3 checks passed
3 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.03%) to 79.748%
Details
dg added a commit that referenced this pull request Sep 27, 2016
@JanTvrdik JanTvrdik deleted the JanTvrdik:pr/file_upload_is_empty branch Sep 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.