@quasilyte opened this Issue on March 30th 2019

I was testing new PHP linter and it catches this always-false condition:

WARNING badCond: always true condition at /matomo/tests/PHPUnit/Fixtures/UITestFixture.php:590
        if ($pluginName == 'ExampleAPI' && ($apiAction != 'xssReportforTwig' || $apiAction != 'xssReportforAngular')) {
                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

https://github.com/matomo-org/matomo/blob/458f0fa9c04fb9e167b682c89e12f8d3151a1875/tests/PHPUnit/Fixtures/UITestFixture.php#L590

Probably should be fixed.
Presumably, && is intended instead of ||.

@sgiehl commented on March 30th 2019 Member

ping @diosmosis you've added that piece of code a few weeks ago, maybe you can have a look and fix it.

This Issue was closed on March 31st 2019
Powered by GitHub Issue Mirror