Skip to content

Commit 24356a8

Browse files
themsaidtaylorotwell
authored andcommitted
[5.5] return empty string if database session key was expired (#21277)
* return empty string if database session key was expired * return empty string at end of method
1 parent fe0295e commit 24356a8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Illuminate/Session/DatabaseSessionHandler.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,14 +93,16 @@ public function read($sessionId)
9393
if ($this->expired($session)) {
9494
$this->exists = true;
9595

96-
return;
96+
return '';
9797
}
9898

9999
if (isset($session->payload)) {
100100
$this->exists = true;
101101

102102
return base64_decode($session->payload);
103103
}
104+
105+
return '';
104106
}
105107

106108
/**

0 commit comments

Comments
 (0)