Skip to content

Commit

Permalink
Prevent empty session creation (#2821)
Browse files Browse the repository at this point in the history
* Prevent empty sessions from being created. 6a5ad31
* Update class.session.php with `!` instead of ` == ''` 1ee976b

Closes #2820
  • Loading branch information
brendo authored and nitriques committed Apr 13, 2018
1 parent 285f9fc commit 6040574
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion symphony/lib/core/class.session.php
Expand Up @@ -183,7 +183,7 @@ public static function write($id, $data)
// in the database. This prevents empty Sessions from being created, but
// allows them to be nulled.
$session_data = Session::read($id);
if (is_null($session_data)) {
if (!$session_data) {
$empty = true;
$unserialized_data = Session::unserialize($data);

Expand Down

0 comments on commit 6040574

Please sign in to comment.