8000 File upload is broken in Laravel 5 when submitting a form without... by jonathanpmartins · Pull Request #12483 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

File upload is broken in Laravel 5 when submitting a form without... #12483

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

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File upload is broken in Laravel 5 when submitting a form without sel…
…ecting a file

My tests revealed that with this tweek the problem described at this issue are resolved: laravel/framework#6189

I don't make unit tests, but this will no more break my code flow.
  • Loading branch information
jonathanpmartins committed Nov 15, 2014
commit 8d05677060300bed74a2ed73ef01b65f9c89dfa1
2 changes: 1 addition & 1 deletion src/Symfony/Component/HttpFoundation/FileBag.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ protected function convertFileInformation($file)

if ($keys == self::$fileKeys) {
if (UPLOAD_ERR_NO_FILE == $file['error']) {
$file = null;
$file = [];
Copy link
Contributor

Choose a reason for hiding this comment

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

still using array() syntax

} else {
$file = new UploadedFile($file['tmp_name'], $file['name'], $file['type'], $file['size'], $file['error']);
}
Expand Down
0