Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[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

Closed
xabbuh wants to merge1 commit intosymfony:6.4fromxabbuh:issue-49014

Conversation

xabbuh
Copy link
Member

QA
Branch?5.4
Bug fix?yes
New feature?no
Deprecations?no
IssuesFix#49014
LicenseMIT

@rudiedirkx
Copy link

rudiedirkx commentedJan 19, 2024
edited
Loading

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:

$_POST:Array(    [op] => Submit it    [values] => Array        (            [text] => Oele        )    [file] => )

(see the[file]) What it should do is what a real browser does: send a non-file, or whatever you would call that:

$_POST:Array(    [op] => Submit it    [values] => Array        (            [text] => asd        ))$_FILES:Array(    [file] => Array        (            [name] =>             [full_path] =>             [type] =>             [tmp_name] =>             [error] => 4            [size] => 0        ))

file is in the $_FILES list, with error 4:UPLOAD_ERR_NO_FILE:https://www.php.net/manual/en/features.file-upload.errors.php#features.file-upload.errors That's what happens if you submit a file field without file.

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.

@fabpotfabpot modified the milestones:5.4,6.4Dec 14, 2024
@nicolas-grekas
Copy link
Member

Closing in favor of#59752, thanks for having a look!

rudiedirkx reacted with heart emoji

@xabbuhxabbuh deleted the issue-49014 branchFebruary 11, 2025 13:10
nicolas-grekas added a commit that referenced this pull requestFeb 11, 2025
…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
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Projects
None yet
Milestone
6.4
Development

Successfully merging this pull request may close these issues.

5 participants
@xabbuh@rudiedirkx@nicolas-grekas@fabpot@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp