Skip to content

Commit

Permalink
[5.5] return empty string if database session key was expired (#21277)
Browse files Browse the repository at this point in the history
*           return empty string if database session key was expired

*         return empty string at end of method
  • Loading branch information
themsaid authored and taylorotwell committed Sep 20, 2017
1 parent fe0295e commit 24356a8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Illuminate/Session/DatabaseSessionHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,16 @@ public function read($sessionId)
if ($this->expired($session)) {
$this->exists = true;

return;
return '';
}

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

return base64_decode($session->payload);
}

return '';
}

/**
Expand Down

0 comments on commit 24356a8

Please sign in to comment.