Skip to content

Commit

Permalink
Merge pull request #1040 from sarciszewski/patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
codeguy committed Mar 2, 2015
2 parents 2d80935 + 9fa6514 commit e434525
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Slim/Middleware/SessionCookie.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ protected function loadSession()

if ($value) {
try {
$_SESSION = unserialize($value);
$_SESSION = json_decode($value, true);
} catch (\Exception $e) {
$this->app->getLog()->error('Error unserializing session cookie value! ' . $e->getMessage());
}
Expand All @@ -138,7 +138,7 @@ protected function loadSession()
*/
protected function saveSession()
{
$value = serialize($_SESSION);
$value = json_encode($_SESSION);

if (strlen($value) > 4096) {
$this->app->getLog()->error('WARNING! Slim\Middleware\SessionCookie data size is larger than 4KB. Content save failed.');
Expand Down

0 comments on commit e434525

Please sign in to comment.