Skip to content

Commit 1886721

Browse files
committed
Fix phpstan error
1 parent e309b55 commit 1886721

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

system/Session/Handlers/RedisHandler.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,9 @@ public function open($path, $name): bool
178178

179179
$redis = new Redis();
180180

181-
$funcConnection = isset($this->savePath['persistent']) && $this->savePath['persistent'] ? 'pconnect' : 'connect';
181+
$funcConnection = isset($this->savePath['persistent']) && $this->savePath['persistent'] === true
182+
? 'pconnect'
183+
: 'connect';
182184

183185
if ($redis->{$funcConnection}($this->savePath['host'], $this->savePath['port'], $this->savePath['timeout']) === false) {
184186
$this->logger->error('Session: Unable to connect to Redis with the configured settings.');

0 commit comments

Comments
 (0)