We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2815f1b commit 79b1c56Copy full SHA for 79b1c56
src/Connection.php
@@ -214,7 +214,7 @@ protected function withFreshQueryLog($callback)
214
protected function getDefaultDatabaseName(string $dsn, array $config): string
215
{
216
if (empty($config['database'])) {
217
- if (! preg_match('/^mongodb(?:[+]srv)?:\\/\\/.+\\/([^?&]+)/s', $dsn, $matches)) {
+ if (! preg_match('/^mongodb(?:[+]srv)?:\\/\\/.+?\\/([^?&]+)/s', $dsn, $matches)) {
218
throw new InvalidArgumentException('Database is not properly configured.');
219
}
220
0 commit comments