Skip to content

Commit 5e66d3f

Browse files
committed
Remove the database from the dsn. (mongodb#971)
See mongodb/mongo-php-library#171
1 parent ba0dd5d commit 5e66d3f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Jenssegers/Mongodb/Connection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ protected function getDsn(array $config)
185185
}
186186
}
187187

188-
return "mongodb://" . implode(',', $hosts) . "/{$database}";
188+
return "mongodb://" . implode(',', $hosts) . ($database? "/{$database}" : '');
189189
}
190190

191191
/**

0 commit comments

Comments
 (0)