Skip to content

Commit 62e5185

Browse files
Brice Vercoustrejfritschi
Brice Vercoustre
authored andcommitted
Fix bad condition (#252)
Inverting `string OR pdo object` condition should be `!string AND !object`
1 parent 381dfdb commit 62e5185

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/CAS/Client.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2545,7 +2545,7 @@ public function setPGTStorageDb(
25452545
$this->ensureIsProxy();
25462546

25472547
// Argument validation
2548-
if ((is_object($dsn_or_pdo) && !($dsn_or_pdo instanceof PDO)) || gettype($dsn_or_pdo) != 'string')
2548+
if (!(is_object($dsn_or_pdo) && $dsn_or_pdo instanceof PDO) && gettype($dsn_or_pdo) != 'string')
25492549
throw new CAS_TypeMismatchException($dsn_or_pdo, '$dsn_or_pdo', 'string or PDO object');
25502550
if (gettype($username) != 'string')
25512551
throw new CAS_TypeMismatchException($username, '$username', 'string');

0 commit comments

Comments
 (0)