Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3e46f95

Browse filesBrowse files
committed
[Component][HttpFoundation][Session][Storage][Handler][MongoDbSessionHandler] Bug Fix - ref:http://mongodb.github.io/mongo-php-library/api/class-MongoDB.Collection.html
1 parent c8d0ba8 commit 3e46f95
Copy full SHA for 3e46f95

File tree

1 file changed

+3
-1
lines changed
Filter options

1 file changed

+3
-1
lines changed

‎src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,9 @@ class MongoDbSessionHandler implements \SessionHandlerInterface
7070
public function __construct($mongo, array $options)
7171
{
7272
if (!($mongo instanceof \MongoClient || $mongo instanceof \Mongo || $mongo instanceof \MongoDB\Client)) {
73-
throw new \InvalidArgumentException('MongoClient or Mongo instance required');
73+
throw new \InvalidArgumentException('MongoClient, Mongo or MongoDB instance required');
74+
}elseif($mongo instanceof \MongoDB\Client && !class_exists('\MongoDB\Collection')){
75+
throw new \InvalidArgumentException('MongoDB/Collection instance not loaded');
7476
}
7577

7678
if (!isset($options['database']) || !isset($options['collection'])) {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.