File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 13
13
14
14
use Symfony \Component \EventDispatcher \EventSubscriberInterface ;
15
15
use Symfony \Component \HttpFoundation \Cookie ;
16
+ use Symfony \Component \HttpFoundation \Exception \SessionNotFoundException ;
16
17
use Symfony \Component \HttpFoundation \ResponseHeaderBag ;
17
18
use Symfony \Component \HttpFoundation \Session \Session ;
18
19
use Symfony \Component \HttpKernel \Event \FilterResponseEvent ;
@@ -82,7 +83,12 @@ public function onKernelResponse(FlashMessageResponseEvent $event)
82
83
return ;
83
84
}
84
85
85
- $ session = $ this ->session ?: $ event ->getRequest ()->getSession ();
86
+ try {
87
+ $ session = $ this ->session ?: $ event ->getRequest ()->getSession ();
88
+ } catch (SessionNotFoundException $ e ) {
89
+ return ;
90
+ }
91
+
86
92
if (null === $ session ) {
87
93
return ;
88
94
}
You can’t perform that action at this time.
0 commit comments