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

PHP equality comparison between map fields always returns true #7896

Closed
PierrickVoulet opened this issue Sep 18, 2020 · 0 comments · Fixed by #7900
Closed

PHP equality comparison between map fields always returns true #7896

PierrickVoulet opened this issue Sep 18, 2020 · 0 comments · Fixed by #7900

Comments

@PierrickVoulet
Copy link

This is a followup issue of #7650

Comparing map fields in PHP always returns true, regardless of the contents:

$mf1 = new MapField(GPBType::INT32, GPBType::INT32);
$mf2 = new MapField(GPBType::INT32, GPBType::INT32);
$mf2[0] = 1;

// This fails with PHP Extension (C implementation) but passes with PHP Module (pure-PHP implementation)
$this->assertFalse($mf1 == $mf2);

This is only the case when using the C implementation. This should be considered as a bug because the pure-PHP and C implementations do not behave in the same way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant