Skip to content

Commit

Permalink
Making sure the database sessions adapter never returns false
Browse files Browse the repository at this point in the history
We had a similar problem with a custom sessions adapter at work, and this change fixed it

Fixes #8785
  • Loading branch information
lorenzo committed May 8, 2016
1 parent bd24bdb commit 035a9d6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Network/Session/DatabaseSession.php
Expand Up @@ -108,7 +108,13 @@ public function read($id)
return $result['data'];
}

return stream_get_contents($result['data']);
$session = stream_get_contents($result['data']);

if ($session === false) {
return '';
}

return $session;
}

/**
Expand Down

0 comments on commit 035a9d6

Please sign in to comment.