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

[5.3] fix multifile uploads when empty #15250

Merged
merged 3 commits into from
Sep 5, 2016
Merged

[5.3] fix multifile uploads when empty #15250

merged 3 commits into from
Sep 5, 2016

Conversation

themsaid
Copy link
Member

@themsaid themsaid commented Sep 2, 2016

When you have a field like this:

<input type="file" name="files[]" multiple>

And you submit without providing any value, Symfony's files->all() will have the following value:

['files' => [null]]

Same issue was noticed with single file uploads reported here #6189, and fixed here #6256

This issue was causing problems with the validator, like here for example: #15044 (comment)

* @param array $files
* @return mixed
*/
private function filterFiles($files)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be protected?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes.

@taylorotwell taylorotwell merged commit 782d14a into laravel:5.3 Sep 5, 2016
taylorotwell pushed a commit that referenced this pull request Sep 9, 2016
PR #15250 broke file uploads in Laravel 5.3.7.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants