Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ziaratban committed Oct 1, 2020
1 parent 0193317 commit 3185c26
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/ClientSession.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,15 @@ public function getId(){
*/
public static function start($db, $sessionOptions = []){
self::prepareOptions($sessionOptions);
Yii::debug('Starting mongodb session ...', __METHOD__);
if($db->enableProfiling)
Yii::debug('Starting mongodb session ...', __METHOD__);
$db->trigger(Connection::EVENT_START_SESSION);
$newSession = new self([
'db' => $db,
'mongoSession' => $db->manager->startSession($sessionOptions),
]);
Yii::debug('MongoDB session started.', __METHOD__);
if($db->enableProfiling)
Yii::debug('MongoDB session started.', __METHOD__);
return $newSession;
}

Expand Down

0 comments on commit 3185c26

Please sign in to comment.