Skip to content

Commit 2456f67

Browse files
committed
refactor: remove unneeded if condition
1 parent 5dffe77 commit 2456f67

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

system/Database/Config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public static function connect($group = null, bool $getShared = true)
6262
$group = (ENVIRONMENT === 'testing') ? 'tests' : $dbConfig->defaultGroup;
6363
}
6464

65-
if (is_string($group) && ! isset($dbConfig->{$group}) && strpos($group, 'custom-') !== 0) {
65+
if (! isset($dbConfig->{$group})) {
6666
throw new InvalidArgumentException($group . ' is not a valid database connection group.');
6767
}
6868
}

0 commit comments

Comments
 (0)