Skip to content

Commit

Permalink
Merge branch '6.3' into 6.4
Browse files Browse the repository at this point in the history
* 6.3:
  append instead of replacing potentially non-existent named-arguments
  [Validator] added missing Polish translation
  add translations for the MacAddress constraint
  remove invalid changelog entry
  Added missing Serbian (sr_Latn) translations
  [Cache][DependencyInjection][Lock][Mailer][Messenger][Notifier][Translation] Url decode username and passwords from `parse_url()` results
  [Security] added missing Albanian translations
  [Validator] Add missing Hungarian translation
  [Serializer] Fix using deserialization path
  [Validator] Add missing hr translation
  • Loading branch information
nicolas-grekas committed Jan 2, 2024
2 parents e7be7af + 862d54a commit 4e00f84
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Store/MongoDbStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,10 @@ private function skimUri(string $uri): string
throw new InvalidArgumentException(sprintf('The given MongoDB Connection URI "%s" is invalid. Expecting "mongodb://" or "mongodb+srv://".', $uri));
}

if (false === $parsedUrl = parse_url($uri)) {
if (false === $params = parse_url($uri)) {
throw new InvalidArgumentException(sprintf('The given MongoDB Connection URI "%s" is invalid.', $uri));
}
$pathDb = ltrim($parsedUrl['path'] ?? '', '/') ?: null;
$pathDb = ltrim($params['path'] ?? '', '/') ?: null;
if (null !== $pathDb) {
$this->options['database'] = $pathDb;
}
Expand Down

0 comments on commit 4e00f84

Please sign in to comment.