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

[ErrorHandler] Fix strpos error when trying to call a method without a name#40019

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

Conversation

@Deuchnord
Copy link

QA
Branch?4.4
Bug fix?yes
New feature?no
Deprecations?no
TicketsNone (direct fix)
LicenseMIT
Doc PRNone

When running the following code:

class Foo{// Some code here}$str ='';// this should not happen, but for some reason, it did.$foo->{$str}();

a fatal error occurs because the method name to execute is empty, but Symfony's error enhancer fails to parse it:

Error screenshot

In this PR, I propose a fix with a more clear error to inform the developer about what happened.

@nicolas-grekasnicolas-grekas changed the titleFix strpos error when trying to call a method without a name[ErrorHandler] Fix strpos error when trying to call a method without a nameJan 28, 2021
@nicolas-grekas
Copy link
Member

Oh, can you also please fixhttps://github.com/symfony/symfony/blob/4.4/src/Symfony/Component/Debug/FatalErrorHandler/UndefinedMethodFatalErrorHandler.php?

Deuchnord reacted with thumbs up emoji

@nicolas-grekas
Copy link
Member

Thank you@Deuchnord.

Deuchnord reacted with hooray emojiDeuchnord reacted with heart emoji

@nicolas-grekasnicolas-grekasforce-pushed thefix-strpos-undefined-method-error branch from888f66c to66be87bCompareJanuary 28, 2021 16:55
@nicolas-grekasnicolas-grekas merged commit27fab22 intosymfony:4.4Jan 28, 2021
@DeuchnordDeuchnord deleted the fix-strpos-undefined-method-error branchJanuary 28, 2021 17:42
@fabpotfabpot mentioned this pull requestFeb 3, 2021
@fabpotfabpot mentioned this pull requestMar 4, 2021
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

@jderussejderussejderusse approved these changes

@ycerutoycerutoyceruto approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

4.4

Development

Successfully merging this pull request may close these issues.

5 participants

@Deuchnord@nicolas-grekas@jderusse@yceruto@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp