Skip to content

Commit 068a0af

Browse files
committed
bugfix: improper database configuration values used
1 parent e1e95a5 commit 068a0af

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
@@ -190,7 +190,7 @@ protected function getHostDsn(array $config)
190190
}
191191

192192
// Check if we want to authenticate against a specific database.
193-
$auth_database = isset($config['options']) && !empty($config['options']['database']) ? $config['options']['database'] : null;
193+
$auth_database = isset($config['database']) && !empty($config['database']) ? $config['database'] : null;
194194
return 'mongodb://' . implode(',', $hosts) . ($auth_database ? '/' . $auth_database : '');
195195
}
196196

0 commit comments

Comments
 (0)