Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
makasim committed Feb 2, 2018
1 parent bca4c60 commit cc34f30
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/CollectionFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function __construct(Client $mongodb, string $mongoDsn)
public function create(string $collectionName, string $databaseName = null, array $options = []): Collection
{
if (false == $databaseName) {
$databaseName = parse_url($this->mongoDsn, PHP_URL_PATH);
$databaseName = ltrim(parse_url($this->mongoDsn, PHP_URL_PATH), '/');
}

if (false == $databaseName) {
Expand Down

0 comments on commit cc34f30

Please sign in to comment.