Skip to content

Commit 94364f4

Browse files
committed
adds a default credentials value
1 parent c67f86c commit 94364f4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Jenssegers/Mongodb/Connection.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ protected function getDsn(array $config)
111111
// Treat host option as array of hosts
112112
$hosts = is_array($config['host']) ? $config['host'] : array($config['host']);
113113

114+
$credentials = null;
115+
114116
if (isset($config['username']) and isset($config['password']))
115117
{
116118
$credentials = "{$username}:{$password}@";

0 commit comments

Comments
 (0)