Skip to content

Commit

Permalink
Merge pull request #438 from php-enqueue/makasim-patch-1
Browse files Browse the repository at this point in the history
[mongodb] Parse DSN if array
  • Loading branch information
makasim authored May 8, 2018
2 parents 53635ce + 7e85b4b commit bfa69d5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/mongodb/MongodbConnectionFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public function __construct($config = 'mongodb:')
} elseif (is_string($config)) {
$config = $this->parseDsn($config);
} elseif (is_array($config)) {
$config = $this->parseDsn(empty($config['dsn']) ? 'mongodb:' : $config['dsn']);
} else {
throw new \LogicException('The config must be either an array of options, a DSN string or null');
}
Expand Down

0 comments on commit bfa69d5

Please sign in to comment.