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

Fixed in place sorting order bug for PHP8+ #18130

Closed
AltamashShaikh opened this issue Oct 11, 2021 · 0 comments · Fixed by #18131
Closed

Fixed in place sorting order bug for PHP8+ #18130

AltamashShaikh opened this issue Oct 11, 2021 · 0 comments · Fixed by #18131
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@AltamashShaikh
Copy link
Contributor

When trying to fetch API.getGlossaryMetrics the order of response changes if php version >= 8 , due to which testcases starts failing
Eg: https://3v4l.org/aK3vq

Expected Behavior

The sort order should be consistent across php versions

Current Behavior

Sort order differs for php versions
https://3v4l.org/aK3vq

Possible Solution

A possible fix is to not return '0' if values are same.
Fixed Eg: https://3v4l.org/3cF8h

Steps to Reproduce (for Bugs)

https://3v4l.org/aK3vq

Context

Funnels Plugin test cases are breaking when running for php version >= 8

Your Environment

  • Matomo Version:
  • PHP Version:
  • Server Operating System:
  • Additionally installed plugins:
  • Browser:
  • Operating System:
@AltamashShaikh AltamashShaikh added the Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. label Oct 11, 2021
@AltamashShaikh AltamashShaikh added the Needs Review PRs that need a code review label Oct 12, 2021
@AltamashShaikh AltamashShaikh added this to the 4.6.0 milestone Oct 12, 2021
@tsteur tsteur added Bug For errors / faults / flaws / inconsistencies etc. and removed Needs Review PRs that need a code review Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. labels Oct 12, 2021
@justinvelluppillai justinvelluppillai changed the title API.getGlossaryMetrics sort gives different result for php8.1 Fixed in place sorting order bug for PHP8+ Nov 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants