Skip to content

Commit ccba30b

Browse files
committed
Database connect now stores separate instances for multiple custom configurations. Fixes #1533
1 parent 7f73520 commit ccba30b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

system/Database/Config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public static function connect($group = null, bool $getShared = true)
7777
if (is_array($group))
7878
{
7979
$config = $group;
80-
$group = 'custom-'. md5(json_encode($config));
80+
$group = 'custom-' . md5(json_encode($config));
8181
}
8282

8383
$config = $config ?? new \Config\Database();

tests/system/Database/Live/ConnectTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<?php namespace CodeIgniter\Database\Live;;
1+
<?php namespace CodeIgniter\Database\Live;
2+
3+
;
24

35
use CodeIgniter\Test\CIDatabaseTestCase;
46
use Config\Database;

0 commit comments

Comments
 (0)