Skip to content

Commit 59952f2

Browse files
authored
Fixed bug that the parameter context on redis cluster cannot work when auth config isn't set or set with null value. (#7554)
1 parent e7bd1b5 commit 59952f2

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/RedisConnection.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,7 @@ protected function createRedisCluster(): RedisCluster
203203
$parameters[] = $this->config['timeout'] ?? 0.0;
204204
$parameters[] = $this->config['cluster']['read_timeout'] ?? 0.0;
205205
$parameters[] = $this->config['cluster']['persistent'] ?? false;
206-
if (isset($this->config['auth'])) {
207-
$parameters[] = $this->config['auth'];
208-
}
206+
$parameters[] = $this->config['auth'] ?? null;
209207
if (! empty($this->config['cluster']['context'])) {
210208
$parameters[] = $this->config['cluster']['context'];
211209
}

0 commit comments

Comments
 (0)