Skip to content
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

Fix warning array_key_exists in deserialization. #398

Merged
merged 3 commits into from
Aug 12, 2016

Conversation

leonnleite
Copy link
Contributor

This problem has reported in PR #110 and #138 ,

but they didn't tests. So I took the liberty of repeating the PR, now I did the tests.

@brunonm
Copy link

brunonm commented Apr 20, 2015

+1

1 similar comment
@piotrantosik
Copy link

👍

@ivan1986 ivan1986 mentioned this pull request May 10, 2015
@@ -162,7 +162,7 @@ public function visitProperty(PropertyMetadata $metadata, $data, Context $contex
{
$name = $this->namingStrategy->translateName($metadata);

if (null === $data || ! array_key_exists($name, $data)) {
if (null === $data || ! is_array($data) || ! array_key_exists($name, $data)) {
Copy link
Owner

Choose a reason for hiding this comment

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

Shouldn't this be an exception?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@schmittjoh after nearly a year, I fix it ...

thank you @Gladhon, for notifying me

@Gladhon
Copy link

Gladhon commented Feb 1, 2016

+1

@goetas goetas added this to the v1.3 milestone Aug 9, 2016
@goetas goetas merged commit 59d3d20 into schmittjoh:master Aug 12, 2016
@goetas goetas mentioned this pull request Aug 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants