Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
sarciszewski committed Mar 2, 2015
1 parent 2d80935 commit 9fa6514
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Slim/Middleware/SessionCookie.php
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 9fa6514

Please sign in to comment.