Skip to content

Commit

Permalink
Update Rules.php
Browse files Browse the repository at this point in the history
Finally passing correct DBGroup to Database::connect; codeigniter4#1326
  • Loading branch information
nowackipawel authored Oct 24, 2018
1 parent 7a30a8f commit 37a7f66
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion system/Validation/Rules.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ public function is_unique(string $str = null, string $field, array $data): bool
// Break the table and field apart
sscanf($field, '%[^.].%[^.]', $table, $field);

$db = Database::connect();
$db = Database::connect($data['DBGroup'] ?? null);

$row = $db->table($table)
->select('1')
Expand Down

0 comments on commit 37a7f66

Please sign in to comment.