Skip to content

Fixed in place sorting order bug for PHP8+ #18130

@AltamashShaikh

Description

@AltamashShaikh

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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugFor errors / faults / flaws / inconsistencies etc.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions