From fdfacbd7741fff5d05513cc374ada74cff6e67cf Mon Sep 17 00:00:00 2001 From: Josh R Date: Sun, 16 Apr 2023 11:57:07 -0400 Subject: [PATCH] Guarantee REDIS_HOST_PORT is never null for UNIX sockets Addresses #1785 (which arises when using UNIX sockets) Without this fix (or manually specifying a bogus REDIS_HOST_PORT) UNIX socket connections won't work if REDIS_HOST is used to specify the socket to the container. Signed-off-by: Josh R. --- .config/redis.config.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.config/redis.config.php b/.config/redis.config.php index a5fde3c7..5ebdda10 100644 --- a/.config/redis.config.php +++ b/.config/redis.config.php @@ -13,5 +13,7 @@ if (getenv('REDIS_HOST')) { $CONFIG['redis']['port'] = (int) getenv('REDIS_HOST_PORT'); } elseif (getenv('REDIS_HOST')[0] != '/') { $CONFIG['redis']['port'] = 6379; + } elseif (getenv('REDIS_HOST')[0] == '/') { + $CONFIG['redis']['port'] = 0; } }