Merge pull request #54944 from nextcloud/backport/54941/stable31

[stable31] fix(cache): Set default Redis port to `0` for UNIX sockets
This commit is contained in:
Andy Scherzinger 2025-09-15 08:45:29 +02:00 committed by GitHub
commit 96c599638b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -77,7 +77,7 @@ class RedisFactory {
$this->instance = new \Redis();
$host = $config['host'] ?? '127.0.0.1';
$port = $config['port'] ?? ($host[0] !== '/' ? 6379 : null);
$port = $config['port'] ?? ($host[0] !== '/' ? 6379 : 0);
$this->eventLogger->start('connect:redis', 'Connect to redis and send AUTH, SELECT');
// Support for older phpredis versions not supporting connectionParameters