diff --git a/system/redis.php b/system/redis.php index 48dfc87d..60398218 100644 --- a/system/redis.php +++ b/system/redis.php @@ -76,7 +76,9 @@ public function __construct($host, $port, $database = 0) public static function db($name = 'default') { if (!isset(static::$databases[$name])) { - if (empty($config = Config::get('database.redis.' . $name, []))) { + $config = Config::get('database.redis.' . $name, []); + + if (empty($config)) { throw new \Exception(sprintf('Redis database config is not configured: %s', $name)); }