aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/RedisFactory.php
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2016-11-11 12:17:00 +0100
committerMorris Jobke <hey@morrisjobke.de>2017-03-25 21:25:38 -0600
commit5da845609dbfa5b0ad53307c382fb665681732d3 (patch)
treec07b68c8d87f3d8ffc426ad005f084ea7c569b58 /lib/private/RedisFactory.php
parent3d0005d001627e3905a314b4e6d264f98737cafa (diff)
downloadnextcloud-server-5da845609dbfa5b0ad53307c382fb665681732d3.tar.gz
nextcloud-server-5da845609dbfa5b0ad53307c382fb665681732d3.zip
no ternary
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'lib/private/RedisFactory.php')
-rw-r--r--lib/private/RedisFactory.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/private/RedisFactory.php b/lib/private/RedisFactory.php
index 810a0585ebf..701e15325c3 100644
--- a/lib/private/RedisFactory.php
+++ b/lib/private/RedisFactory.php
@@ -44,8 +44,16 @@ class RedisFactory {
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'])) {