File tree Expand file tree Collapse file tree 1 file changed +2
-13
lines changed Expand file tree Collapse file tree 1 file changed +2
-13
lines changed Original file line number Diff line number Diff line change 11
11
use RuntimeException ;
12
12
use Symfony \Component \HttpFoundation \ParameterBag ;
13
13
use Symfony \Component \HttpFoundation \Request as SymfonyRequest ;
14
- use Symfony \Component \HttpFoundation \Session \SessionInterface ;
15
14
16
15
/**
17
16
* @method array validate(array $rules, ...$params)
@@ -405,8 +404,8 @@ public static function createFrom(self $from, $to = null)
405
404
406
405
$ request ->setJson ($ from ->json ());
407
406
408
- if ($ from ->hasSession ()) {
409
- $ request ->setLaravelSession ($ from -> getSession () );
407
+ if ($ from ->hasSession () && $ session = $ from -> getSession () ) {
408
+ $ request ->setLaravelSession ($ session );
410
409
}
411
410
412
411
$ request ->setUserResolver ($ from ->getUserResolver ());
@@ -489,16 +488,6 @@ public function session()
489
488
return $ this ->session ;
490
489
}
491
490
492
- /**
493
- * Get the session associated with the request.
494
- *
495
- * @return \Illuminate\Session\Store
496
- */
497
- public function getSession (): SessionInterface
498
- {
499
- return $ this ->session ;
500
- }
501
-
502
491
/**
503
492
* Set the session instance on the request.
504
493
*
You can’t perform that action at this time.
0 commit comments