We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a614fb1 commit 79a2b0cCopy full SHA for 79a2b0c
src/FirestoreSessionHandler.php
@@ -77,6 +77,12 @@ public function close()
77
*/
78
public function read($sessionId)
79
{
80
+ $snapshot = $this->getCollection()->document($sessionId)->snapshot();
81
+
82
+ if (empty($this->getCollection()->document($sessionId)->snapshot()->data())) {
83
+ return '';
84
+ }
85
86
$session = (object) $this->getCollection()->document($sessionId)->snapshot()->data();
87
88
if ($this->expired($session)) {
@@ -205,7 +211,7 @@ protected function userAgent()
205
211
206
212
public function destroy($sessionId)
207
213
208
- $this->getCollection()->document($sessionId)->reference()->delete();
214
+ $this->getCollection()->document($sessionId)->delete();
209
215
210
216
return true;
217
}
0 commit comments