From 9634f6332a97103b25dd173a1ba30153a60f86ad Mon Sep 17 00:00:00 2001 From: "Henning H. Haugen" Date: Sat, 25 Apr 2026 00:17:23 +0200 Subject: [PATCH] Support TLS --- src/xPDO/Cache/xPDORedisCache.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/xPDO/Cache/xPDORedisCache.php b/src/xPDO/Cache/xPDORedisCache.php index 4dc84ff7..cc9436d7 100644 --- a/src/xPDO/Cache/xPDORedisCache.php +++ b/src/xPDO/Cache/xPDORedisCache.php @@ -38,7 +38,10 @@ public function __construct(&$xpdo, $options = []) $this->getOption('redis_server', $options, 'localhost:6379') ) ); - if ($this->redis->pconnect($server[0], (int)$server[1])) { + + $server_url = count($server) === 3 ? "$server[0]:$server[1]" : $server[0]; + $server_port = count($server) === 3 ? (int)$server[2] : (int)$server[1] ?? 6379; + if ($this->redis->pconnect($server_url, $server_port)) { $redis_auth = $this->getOption('redis_auth', $options, ''); if (!empty($redis_auth)) { $this->redis->auth($redis_auth);