Skip to content

Commit

Permalink
no ternary
Browse files Browse the repository at this point in the history
  • Loading branch information
butonic authored and DeepDiver1975 committed Mar 21, 2017
1 parent be085e9 commit ec9a9c9
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions lib/private/RedisFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,16 @@ private function create() {
throw new \Exception('Redis Cluster support is not available');
}
// cluster config
$timeout = isset($config['timeout']) ? $config['timeout'] : null;
$readTimeout = isset($config['read_timeout']) ? $config['read_timeout'] : null;
if (isset($config['timeout'])) {
$timeout = $config['timeout'];
} else {
$timeout = null;
}
if (isset($config['read_timeout'])) {
$readTimeout = $config['read_timeout'];
} else {
$readTimeout = null;
}
$this->instance = new \RedisCluster(null, $config['seeds'], $timeout, $readTimeout);

if (isset($config['failover_mode'])) {
Expand Down

0 comments on commit ec9a9c9

Please sign in to comment.