File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,11 @@ public function __construct(string $savePath = null)
49
49
throw new \RuntimeException (sprintf ('Session Storage was not able to create directory "%s". ' , $ baseDir ));
50
50
}
51
51
52
- ini_set ('session.save_path ' , $ savePath );
53
- ini_set ('session.save_handler ' , 'files ' );
52
+ if ($ savePath !== \ini_get ('session.save_path ' )) {
53
+ ini_set ('session.save_path ' , $ savePath );
54
+ }
55
+ if ('files ' !== \ini_get ('session.save_handler ' )) {
56
+ ini_set ('session.save_handler ' , 'files ' );
57
+ }
54
58
}
55
59
}
Original file line number Diff line number Diff line change @@ -455,9 +455,10 @@ public function setOptions(array $options)
455
455
*/
456
456
public function setSaveHandler ($ saveHandler = null )
457
457
{
458
- if (!$ saveHandler instanceof AbstractProxy &&
459
- !$ saveHandler instanceof \SessionHandlerInterface &&
460
- null !== $ saveHandler ) {
458
+ if (!$ saveHandler instanceof AbstractProxy
459
+ && !$ saveHandler instanceof \SessionHandlerInterface
460
+ && null !== $ saveHandler
461
+ ) {
461
462
throw new \InvalidArgumentException ('Must be instance of AbstractProxy; implement \SessionHandlerInterface; or be null. ' );
462
463
}
463
464
You can’t perform that action at this time.
0 commit comments