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

ReportsProvider category never gets reset due to isset check #18139

Closed
AltamashShaikh opened this issue Oct 12, 2021 · 0 comments · Fixed by #18140
Closed

ReportsProvider category never gets reset due to isset check #18139

AltamashShaikh opened this issue Oct 12, 2021 · 0 comments · Fixed by #18140
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.

Comments

@AltamashShaikh
Copy link
Contributor

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

  • 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 12, 2021
@tsteur tsteur added not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. Bug For errors / faults / flaws / inconsistencies etc. and removed Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. labels Oct 12, 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. not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants