Skip to content

Commit 826ec4f

Browse files
author
Fredrick Peter
committed
update
1 parent bd4da20 commit 826ec4f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/DatabaseManager.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public static function connection(?string $name = null, ?array $default = [])
4242
);
4343

4444
// merge data
45-
$mergeData = array_merge($data ?? [], $default);
45+
$mergeData = array_merge($data ?? [], $default ?? []);
4646

4747
// Cache the connection
4848
FileCache::put(
@@ -80,7 +80,8 @@ public static function getConnection(?string $name = null)
8080
*/
8181
public static function disconnect(?string $name = null)
8282
{
83-
$key = self::getCacheKey($name);
83+
$name = empty($name) ? 'default' : $name;
84+
$key = self::getCacheKey($name);
8485
if (FileCache::has($key)) {
8586
FileCache::forget($key);
8687
}

0 commit comments

Comments
 (0)