8000 Merge branch '6.4' into 7.1 · symfony/cache@5021648 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5021648

Browse files
committed
Merge branch '6.4' into 7.1
* 6.4: silence warnings issued by Redis Sentinel on connection issues
2 parents 86e5296 + d0ab1d3 commit 5021648

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Traits/RedisTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,10 +252,10 @@ public static function createConnection(#[\SensitiveParameter] string $dsn, arra
252252
} else {
253253
$extra = $passAuth ? [$params['auth']] : [];
254254

255-
$sentinel = new $sentinelClass($host, $port, $params['timeout'], (string) $params['persistent_id'], $params['retry_interval'], $params['read_timeout'], ...$extra);
255+
$sentinel = @new $sentinelClass($host, $port, $params['timeout'], (string) $params['persistent_id'], $params['retry_interval'], $params['read_timeout'], ...$extra);
256256
}
257257

258-
if ($address = $sentinel->getMasterAddrByName($params['redis_sentinel'])) {
258+
if ($address = @$sentinel->getMasterAddrByName($params['redis_sentinel'])) {
259259
[$host, $port] = $address;
260260
}
261261
} catch (\RedisException|\Relay\Exception $redisException) {

0 commit comments

Comments
 (0)
0