Incorrect Logical Operator Medium

The condition always evaluates to true due to the misuse of the OR operator when checking for inequality with multiple values. To fix this, replace the OR operator (||) with the AND operator (&&) to correctly check if a value is not equal to multiple options.

Detector ID
shell/incorrect-logical-operator@v1.0
Category
Common Weakness Enumeration (CWE) external icon
-
Tags
-