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