Skip to content

Commit a0a62d1

Browse files
committed
Fix a bug for new sessions
1 parent 4ac7ecd commit a0a62d1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/ElasticSessionStore.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ public function gc($maxLifeTime) {
6565

6666
public function read($sessionId) {
6767
$model = @$this->find($sessionId);
68+
if (!$model) {
69+
return null;
70+
}
6871
$this->_cache[$sessionId] = $model;
6972
return $model->data;
7073
}

0 commit comments

Comments
 (0)