File tree 1 file changed +9
-16
lines changed
src/Symfony/Component/HttpFoundation/Session/Storage
1 file changed +9
-16
lines changed Original file line number Diff line number Diff line change @@ -88,24 +88,17 @@ class NativeSessionStorage implements SessionStorageInterface
88
88
*/
89
89
public function __construct (array $ options = array (), \SessionHandlerInterface $ handler = null , MetadataBag $ metaBag = null )
90
90
{
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
+ );
103
96
104
- session_register_shutdown ();
97
+ session_register_shutdown ();
105
98
106
- $ this ->setOptions ( $ options );
107
- $ this ->setSaveHandler ( $ handler );
108
- }
99
+ $ this ->setMetadataBag ( $ metaBag );
100
+ $ this ->setOptions ( $ options );
101
+ $ this -> setSaveHandler ( $ handler );
109
102
}
110
103
111
104
/**
You can’t perform that action at this time.
0 commit comments