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

[Form] Fixed ContextErrorException in FileType#25102

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

Conversation

@chihiro-adachi
Copy link

QA
Branch?2.7
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#25063
LicenseMIT
Doc PR--

Fixed an issue that ContextErrorException occurs when multiple is enabled.

$files =$event->getData();

foreach ($event->getData()as$file) {
if (!is_array($files)) {
Copy link
Member

Choose a reason for hiding this comment

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

What about checking fornull here first and then dropping everything afterwards that is not an array?

Copy link
Member

Choose a reason for hiding this comment

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

or maybe just:

if (!is_array($files)) {$files =array(null);}

Choose a reason for hiding this comment

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

@xabbuh Thank you, I fixed it.

@nicolas-grekasnicolas-grekas added this to the2.7 milestoneNov 22, 2017

foreach ($event->getData()as$file) {
if (!is_array($files)) {
$files =array(null);
Copy link
Contributor

Choose a reason for hiding this comment

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

$files = array(); also looks more better to me, it reduces the redundant traverse over them andRequestHandlerInterface::isFileUpload() method call.

Choose a reason for hiding this comment

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

fixed while merging

issei-m reacted with thumbs up emoji
@nicolas-grekas
Copy link
Member

Thank you@chihiro-adachi.

nicolas-grekas added a commit that referenced this pull requestNov 23, 2017
…achi)This PR was squashed before being merged into the 2.7 branch (closes#25102).Discussion----------[Form] Fixed ContextErrorException in FileType| Q             | A| ------------- | ---| Branch?       |  2.7| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#25063| License       | MIT| Doc PR        | --Fixed an issue that ContextErrorException occurs when multiple is enabled.Commits-------1b408e6 [Form] Fixed ContextErrorException in FileType
@chihiro-adachichihiro-adachi deleted the fix-file-type branchNovember 24, 2017 00:18
This was referencedNov 24, 2017
This was referencedDec 4, 2017
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

@xabbuhxabbuhxabbuh approved these changes

+1 more reviewer

@issei-missei-missei-m left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

2.7

Development

Successfully merging this pull request may close these issues.

5 participants

@chihiro-adachi@nicolas-grekas@issei-m@xabbuh@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp