Skip to content

[HttpFoundation] Added possibility to disable base_64 encoding of session #5483

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Removed unnecessary else
  • Loading branch information
Baldur Rensch committed Sep 10, 2012
commit 78d697ec6f08de6ac8eb20ced52f4bb9b873b25d
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,9 @@ public function read($id)
if (count($sessionRows) == 1) {
if ($this->dbOptions['base64_encode']) {
return base64_decode($sessionRows[0][0]);
} else {
return $sessionRows[0][0];
}
}

return $sessionRows[0][0];
}

// session does not exist, create it
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,6 @@ public function testSessionGC()
$this->assertEquals(0, count($this->pdo->query('SELECT * FROM sessions')->fetchAll()));
}

/**
* This tests disabling the base64_encoding option.
*/
public function testEncoding()
{
$storage = new PdoSessionHandler($this->pdo, array('db_table' => 'sessions'), array());
Expand Down