File tree Expand file tree Collapse file tree 1 file changed +3
-10
lines changed
lib/internal/Magento/Framework/Session Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -317,11 +317,8 @@ public function setName($name)
317
317
*/
318
318
public function destroy (array $ options = null )
319
319
{
320
- if (null === $ options ) {
321
- $ options = $ this ->defaultDestroyOptions ;
322
- } else {
323
- $ options = array_merge ($ this ->defaultDestroyOptions , $ options );
324
- }
320
+ $ options = $ options ?? [];
321
+ $ options = array_merge ($ this ->defaultDestroyOptions , $ options );
325
322
326
323
if ($ options ['clear_storage ' ]) {
327
324
$ this ->clearStorage ();
@@ -504,11 +501,7 @@ public function regenerateId()
504
501
return $ this ;
505
502
}
506
503
507
- if ($ this ->isSessionExists ()) {
508
- session_regenerate_id (true );
509
- } else {
510
- session_start ();
511
- }
504
+ $ this ->isSessionExists () ? session_regenerate_id (true ) : session_start ();
512
505
$ this ->storage ->init (isset ($ _SESSION ) ? $ _SESSION : []);
513
506
514
507
if ($ this ->sessionConfig ->getUseCookies ()) {
You can’t perform that action at this time.
0 commit comments