diff --git a/Store/MongoDbStore.php b/Store/MongoDbStore.php index ada8438..216b16e 100644 --- a/Store/MongoDbStore.php +++ b/Store/MongoDbStore.php @@ -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; }