]> git.mxchange.org Git - friendica.git/blobdiff - src/Core/Cache/Type/RedisCache.php
Merge branch 'friendica:develop' into 6606-k-alin-mysql-unix-socket
[friendica.git] / src / Core / Cache / Type / RedisCache.php
index a58936cfc9b0d9839a3fb764e07180925bc93ca9..a3a5cf7c8415b6d885be3d689c09cebda0c2420e 100644 (file)
@@ -59,13 +59,13 @@ class RedisCache extends AbstractCache implements ICanCacheInMemory
                $redis_pw   = $config->get('system', 'redis_password');
                $redis_db   = $config->get('system', 'redis_db', 0);
 
-               if (isset($redis_port) && !@$this->redis->connect($redis_host, $redis_port)) {
+               if (!empty($redis_port) && !@$this->redis->connect($redis_host, $redis_port)) {
                        throw new CachePersistenceException('Expected Redis server at ' . $redis_host . ':' . $redis_port . ' isn\'t available');
                } elseif (!@$this->redis->connect($redis_host)) {
                        throw new CachePersistenceException('Expected Redis server at ' . $redis_host . ' isn\'t available');
                }
 
-               if (isset($redis_pw) && !$this->redis->auth($redis_pw)) {
+               if (!empty($redis_pw) && !$this->redis->auth($redis_pw)) {
                        throw new CachePersistenceException('Cannot authenticate redis server at ' . $redis_host . ':' . $redis_port);
                }