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

Always false condition #14289

Closed
quasilyte opened this issue Mar 30, 2019 · 1 comment · Fixed by #14296
Closed

Always false condition #14289

quasilyte opened this issue Mar 30, 2019 · 1 comment · Fixed by #14296
Assignees
Labels
not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.

Comments

@quasilyte
Copy link

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')) {
                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

if ($pluginName == 'ExampleAPI' && ($apiAction != 'xssReportforTwig' || $apiAction != 'xssReportforAngular')) {

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

@sgiehl
Copy link
Member

sgiehl commented Mar 30, 2019

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

@diosmosis diosmosis self-assigned this Mar 30, 2019
@mattab mattab added the not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. label Jun 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

4 participants