-
-
Notifications
You must be signed in to change notification settings - Fork 850
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
Fixed an error where an exception was thrown if the messenger input data has an id field #3448
Conversation
if (!isset($context[self::OBJECT_TO_POPULATE]) && isset($data['data']['id'])) { | ||
if (!isset($context[self::OBJECT_TO_POPULATE]) | ||
&& isset($data['data']['id']) | ||
&& (null === $this->resourceMetadataFactory || !$this->resourceMetadataFactory->create($class)->getAttribute('messenger', false)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$this->resourceMetadataFactory->create($class)
may be null
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(true || x)
will never evaluate x
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not resourceMetadataFactory
I mean the result of calling create
can be null https://3v4l.org/18tE1 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, got it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed it
4c48b64
to
f457e46
Compare
can you rebase on 2.5 ? |
f457e46
to
c8ec35e
Compare
I rebased against 2.5 |
I'm sorry, but this doesn't seem like the right fix at all. |
If there is a bug, we should address the core issue. This workaround is wrong. |
IMO the |
…ata has an id field
c8ec35e
to
e5ef106
Compare
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
How to reproduce:
The error in response:
The entire stacktrace https://gist.github.com/karser/9425657bff25da4026591e6af6e227fb