Skip to content

Commit

Permalink
small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
esyede committed Oct 1, 2023
1 parent 3a88453 commit 8bdc6ff
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion system/redis.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

Expand Down

0 comments on commit 8bdc6ff

Please sign in to comment.