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.7] Error ValidationException handler #27632

Merged
merged 5 commits into from
Feb 25, 2019

Conversation

fbrissi
Copy link
Contributor

@fbrissi fbrissi commented Feb 22, 2019

At Handler.php#L251 it uses $request->except() and if you already interacted with an uploaded file, an exception of FileNotFoundException is throwed, because the file was readed and the temporal file dosen't more exist.

The possible solution is $request->except() plus a boolean parser $includeFiles, the default value is true, allowing to include or not files and in the handler invalid method, passing false.

This makes a lot of sense since in the withInput method, the arrays are removed.

… files were read and the stream no longer exists.
@driesvints driesvints changed the title Error ValidationException handler [5.7] Error ValidationException handler Feb 22, 2019
@taylorotwell
Copy link
Member

Why add a flag to the except method? Why not just merge the file keys with dontFlash?

@dbpolito
Copy link
Contributor

Or maybe array_except($request->input(), $this->dontFlash)

@fbrissi
Copy link
Contributor Author

fbrissi commented Feb 24, 2019

Right.

array_except($request->input(), $this->dontFlash)

@taylorotwell taylorotwell merged commit ab0da3b into laravel:5.7 Feb 25, 2019
@fbrissi fbrissi deleted the bugfix/error_except_files branch February 25, 2019 22:39
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 participants