summaryrefslogtreecommitdiffstats
path: root/system/libraries/Cache
diff options
context:
space:
mode:
authorMasterklavi <masterklavi@gmail.com>2016-03-14 10:05:12 +0100
committerMasterklavi <masterklavi@gmail.com>2016-03-14 10:05:12 +0100
commitd327a4fc32b507a44e418cdd4b6e2c63690bc5cc (patch)
tree70fe972339abf874094f1a68c378d026545c4e42 /system/libraries/Cache
parent49f440a12974ea0af37b3e306cd3a26aa557f469 (diff)
Unix socket check in one long line
Diffstat (limited to 'system/libraries/Cache')
-rw-r--r--system/libraries/Cache/drivers/Cache_redis.php9
1 files changed, 1 insertions, 8 deletions
diff --git a/system/libraries/Cache/drivers/Cache_redis.php b/system/libraries/Cache/drivers/Cache_redis.php
index 475dd4420..ec4432437 100644
--- a/system/libraries/Cache/drivers/Cache_redis.php
+++ b/system/libraries/Cache/drivers/Cache_redis.php
@@ -104,14 +104,7 @@ class CI_Cache_redis extends CI_Driver
try
{
- // for unix domain socket
- if ($config['host'][0] === '/')
- {
- $config['port'] = 0;
- $config['timeout'] = 0;
- }
-
- if ( ! $this->_redis->connect($config['host'], $config['port'], $config['timeout']))
+ if ( ! $this->_redis->connect($config['host'], ($config['host'][0] === '/' ? 0 : $config['port']), $config['timeout']))
{
log_message('error', 'Cache: Redis connection failed. Check your configuration.');
}