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

File upload is broken when submitting a form without selecting a file. #14

Closed
wants to merge 2 commits into from
Closed

Conversation

jonathanpmartins
Copy link

File upload is broken when submitting a form without selecting a file in Laravel 5! My tests revealed that with this tweek the problem described at this issue are resolved: laravel/framework#6189

Credits to @Marwelln

This resolves a problem that occours in Symfony on the FileBag.php file, convertFileInformation() method. It receaves a empty array file and than returns NULL, if no files was selected on the upload. In this case "FileBag->set('image', NULL)" receives NULL, and that is what is dispatching a throw in Symfony.

I misunderstood the problem, and try attempt to do a pull request on symfony, but it was denied: symfony/symfony#12486

I don't make unit tests, but this will no more break my code flow. I'm not sure if this is the real deal! If someone could look deeper into the problem, I appreciated!

File upload is broken when submitting a form without selecting a file in Laravel 5! My tests revealed that with this tweek the problem described at this issue are resolved: laravel/framework#6189

Credits to @Marwelln

This resolves a problem that occours in Symfony on the FileBag.php file, convertFileInformation() method. It receaves a empty array file and than returns NULL, if no files was selected on the upload. In this case "FileBag->set('image', NULL)" receives NULL, and that is what is dispatching a throw in Symfony.

I misunderstood the problem, and try attempt to do a pull request on symfony, but it was denied: symfony/symfony#12486

I don't make unit tests, but this will no more break my code flow. I'm not sure if this is the real deal! If someone could look deeper into the problem, I appreciated!
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.

[5.0] File upload is broken when submitting a form without selecting a file
1 participant