Skip to content

Commit

Permalink
Merge branch '5.4' into 6.3
Browse files Browse the repository at this point in the history
* 5.4:
  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 cbcce03 + 1ab4253 commit 862d54a
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 @@ -142,10 +142,10 @@ public function __construct(Collection|Client|string $mongo, array $options = []
*/
private function skimUri(string $uri): string
{
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 862d54a

Please sign in to comment.