From bdf5acd6d4883296d093eb5fbccc42865c21c5d0 Mon Sep 17 00:00:00 2001 From: Christoph Potas Date: Mon, 10 Dec 2018 10:12:18 +0100 Subject: [PATCH 1/2] ~ use $defaultGroup as default value for database session usage Signed-off-by: Christoph Potas --- system/Session/Handlers/DatabaseHandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/Session/Handlers/DatabaseHandler.php b/system/Session/Handlers/DatabaseHandler.php index 5cda3bca6a50..051efddf1da1 100644 --- a/system/Session/Handlers/DatabaseHandler.php +++ b/system/Session/Handlers/DatabaseHandler.php @@ -102,7 +102,7 @@ public function __construct(BaseConfig $config, string $ipAddress) } // Get DB Connection - $this->DBGroup = ! empty($config->sessionDBGroup) ? $config->sessionDBGroup : 'default'; + $this->DBGroup = $config->sessionDBGroup ?? config( Database::class )->defaultGroup; $this->db = Database::connect($this->DBGroup); From 271fc9f611b012194786ef07039b60edf8dadb4e Mon Sep 17 00:00:00 2001 From: Christoph Potas Date: Mon, 10 Dec 2018 10:13:14 +0100 Subject: [PATCH 2/2] ~ apply style Signed-off-by: Christoph Potas --- system/Session/Handlers/DatabaseHandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/Session/Handlers/DatabaseHandler.php b/system/Session/Handlers/DatabaseHandler.php index 051efddf1da1..bae03a1003fa 100644 --- a/system/Session/Handlers/DatabaseHandler.php +++ b/system/Session/Handlers/DatabaseHandler.php @@ -102,7 +102,7 @@ public function __construct(BaseConfig $config, string $ipAddress) } // Get DB Connection - $this->DBGroup = $config->sessionDBGroup ?? config( Database::class )->defaultGroup; + $this->DBGroup = $config->sessionDBGroup ?? config(Database::class)->defaultGroup; $this->db = Database::connect($this->DBGroup);