Live.getLastVisitsDetails API sort order different for PHP8 #18234
Labels
Bug
For errors / faults / flaws / inconsistencies etc.
not-in-changelog
For issues or pull requests that should not be included in our release changelog on matomo.org.
Due to stable sorting in PHP 8, the result order seems to change when hitting same API on different PHP versions.
Expected Behavior
The output order should be same across all the versions
Current Behavior
The output differs for different PHP versions
Possible Solution
Changing the below code to renturn '-1' instead of '0'
https://github.com/matomo-org/matomo/blob/4.x-dev/plugins/Live/Visitor.php#L309
Steps to Reproduce (for Bugs)
If you have FormAnalytics plugin installed you can try executing the system test cases in PHP8 and the output will differ for you from PHP7.
Context
Trying to add PHP8 in travis build for FormAnalytics plugin and the build is failing due to this
Your Environment
The text was updated successfully, but these errors were encountered: