Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d28b9dd

Browse filesBrowse files
Seldaekfabpot
authored andcommitted
[HttpFoundation] Fix session::remove() not initializing the session
1 parent 568cd57 commit d28b9dd
Copy full SHA for d28b9dd

File tree

Expand file treeCollapse file tree

1 file changed

+3
-4
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-4
lines changed

‎src/Symfony/Component/HttpFoundation/Session.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpFoundation/Session.php
+3-4Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,10 @@ public function setAttributes($attributes)
150150
*/
151151
public function remove($name)
152152
{
153+
if (false === $this->started) {
154+
$this->start();
155+
}
153156
if (array_key_exists($name, $this->attributes)) {
154-
if (false === $this->started) {
155-
$this->start();
156-
}
157-
158157
unset($this->attributes[$name]);
159158
}
160159
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.