@AltamashShaikh opened this Issue on October 8th 2021 Contributor

FakeAccess update idsite comparison for all to strict

Expected Behavior

https://github.com/matomo-org/matomo/blob/4.x-dev/tests/PHPUnit/Framework/Mock/FakeAccess.php#L169
'0' == 'all' should return false, but returns true for PHP version < 8

It should return false since we have a strict check when not testing via FakeAccess

Current Behavior

'0' == 'all' is returning true for PHP versions < 7

Possible Solution

change the condition to $idSites === 'all' in https://github.com/matomo-org/matomo/blob/4.x-dev/tests/PHPUnit/Framework/Mock/FakeAccess.php#L169

Steps to Reproduce (for Bugs)

  1. Refer this url to test the behaviour https://3v4l.org/17cZ2

Context

This bug breaks test cases when running on php8

Your Environment

  • Matomo Version:
  • PHP Version:
  • Server Operating System:
  • Additionally installed plugins:
  • Browser:
  • Operating System:
This Issue was closed on October 8th 2021
Powered by GitHub Issue Mirror