Skip to content

Commit 7aa55fa

Browse files
author
Toni Vega
committed
[5.x] Replaced a too strict assertion in DatabaseSessionHandler.php that prevented to use the sessions at all with a more simple sanity check. Test already failed on that, now they pass.
1 parent 51194eb commit 7aa55fa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Session/MongoDbSessionHandler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ public function read($sessionId): string|false
5656
'typeMap' => ['root' => 'bson'],
5757
],
5858
);
59-
assert($result instanceof Document);
6059

61-
return $result ? (string) $result->payload : false;
60+
61+
return $result?->payload ? (string) $result->payload : false;
6262
}
6363

6464
public function write($sessionId, $data): bool

0 commit comments

Comments
 (0)