Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
[BrowserKit] do not try to read from empty filenames#53586
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
xabbuh commentedJan 19, 2024
Q | A |
---|---|
Branch? | 5.4 |
Bug fix? | yes |
New feature? | no |
Deprecations? | no |
Issues | Fix#49014 |
License | MIT |
rudiedirkx commentedJan 19, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
This does fix the exception from#49014 BUT it doesn't do what a browser does, and it might break the application behind the form. Instead of sending an empty/non-file, it sends the file field as a normal field with empty string:
(see the
IMO deleting the file from the form is a better solution than the empty string, but sending the non-file would be even more realistic, but I don't know how symfony/curl would do that. |
Closing in favor of#59752, thanks for having a look! |
…nicolas-grekas)This PR was merged into the 6.4 branch.Discussion----------[BrowserKit] Fix submitting forms with empty file fields| Q | A| ------------- | ---| Branch? | 6.4| Bug fix? | yes| New feature? | no| Deprecations? | no| Issues |Fix#49014| License | MITReplaces#53586 and#59621Commits-------0fbfc3e [BrowserKit] Fix submitting forms with empty file fields