8000 Remove NativeSessionStorage changes (moved to https://github.com/symf… · symfony/symfony@04164e2 · GitHub
[go: up one dir, main page]

Skip to content

Commit 04164e2

Browse files
committed
Remove NativeSessionStorage changes (moved to #24531)
1 parent 2c7d366 commit 04164e2

File tree

1 file changed

+9
-16
lines changed

1 file changed

+9
-16
lines changed

src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -88,24 +88,17 @@ class NativeSessionStorage implements SessionStorageInterface
8888
*/
8989
public function __construct(array $options = array(), \SessionHandlerInterface $handler = null, MetadataBag $metaBag = null)
9090
{
91-
$this->setMetadataBag($metaBag);
92-
93-
if (\PHP_SESSION_ACTIVE === session_status()) {
94-
if (!empty($options) || null !== $handler) {
95-
throw new \LogicException('Cannot change options or handler of an active session');
96-
}
97-
} else {
98-
$options += array(
99-
// disable by default because it's managed by HeaderBag (if used)
100-
'cache_limiter' => '',
101-
'use_cookies' => 1,
102-
);
91+
$options += array(
92+
// disable by default because it's managed by HeaderBag (if used)
93+
'cache_limiter' => '',
94+
'use_cookies' => 1,
95+
);
10396

104-
session_register_shutdown();
97+
session_register_shutdown();
10598

106-
$this->setOptions($options);
107-
$this->setSaveHandler($handler);
108-
}
99+
$this->setMetadataBag($metaBag);
100+
$this->setOptions($options);
101+
$this->setSaveHandler($handler);
109102
}
110103

111104
/**

0 commit comments

Comments
 (0)
0