Skip to content

Commit edf6170

Browse files
committed
more adjustments from PR
1 parent 1c26ec5 commit edf6170

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Component/Cache/Traits/RedisTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ public static function createConnection($dsn, array $options = [])
252252
if ($params['redis_cluster']) {
253253
$params['cluster'] = 'redis';
254254
if (isset($params['redis_sentinel'])) {
255-
throw new InvalidArgumentException(sprintf('Invalid Redis DSN: cannot use both redis_cluster and redis_sentinel at the same time: %s', $dsn));
255+
throw new InvalidArgumentException(sprintf('Cannot use both "redis_cluster" and "redis_sentinel" at the same time: %s', $dsn));
256256
}
257257
} elseif (isset($params['redis_sentinel'])) {
258258
$params['replication'] = 'sentinel';
@@ -279,7 +279,7 @@ public static function createConnection($dsn, array $options = [])
279279
}
280280

281281
$redis = new $class($hosts, array_diff_key($params, self::$defaultConnectionOptions));
282-
if ($params['redis_sentinel']) {
282+
if (isset($params['redis_sentinel'])) {
283283
$redis->getConnection()->setSentinelTimeout($params['timeout']);
284284
}
285285
} elseif (class_exists($class, false)) {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy