Преглед на файлове

Merge pull request #28129 from nextcloud/bugfix/noid/redis-allow-defaults

Allow empty Redis config
tags/v23.0.0beta1
John Molakvoæ преди 2 години
родител
ревизия
229bfcbab5
No account linked to committer's email address
променени са 1 файла, в които са добавени 4 реда и са изтрити 4 реда
  1. 4
    4
      lib/private/RedisFactory.php

+ 4
- 4
lib/private/RedisFactory.php Целия файл

@@ -51,10 +51,6 @@ class RedisFactory {
? $this->config->getValue('redis.cluster', [])
: $this->config->getValue('redis', []);

if (empty($config)) {
throw new \Exception('Redis config is empty');
}

if ($isCluster && !class_exists('RedisCluster')) {
throw new \Exception('Redis Cluster support is not available');
}
@@ -86,6 +82,10 @@ class RedisFactory {

// cluster config
if ($isCluster) {
if (!isset($config['seeds'])) {
throw new \Exception('Redis cluster config is missing the "seeds" attribute');
}

// Support for older phpredis versions not supporting connectionParameters
if ($connectionParameters !== null) {
$this->instance = new \RedisCluster(null, $config['seeds'], $timeout, $readTimeout, false, $auth, $connectionParameters);

Loading…
Отказ
Запис