ReportsProvider category never gets reset due to isset check #18139
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.
In https://github.com/matomo-org/matomo/blob/4.x-dev/core/Plugin/ReportsProvider.php#L203 the categoryList remain same when running test cases and which leads to use of wrong category info for subsequent testcases.
Expected Behavior
Ideally the category should be fetched again if idSite is different
Current Behavior
It fetches the data only once and uses the same data for subsequent call.
Possible Solution
Since this is most likely to affect test cases, we can create a method to unset the variable and call the method from respective test cases
Steps to Reproduce (for Bugs)
Context
Test cases output started to differ in PHP8 and after debugging came to know that this is a bug when running testcases.
Your Environment
The text was updated successfully, but these errors were encountered: