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 1313
1414use Symfony \Component \EventDispatcher \EventSubscriberInterface ;
1515use Symfony \Component \HttpFoundation \Cookie ;
16+ use Symfony \Component \HttpFoundation \Exception \SessionNotFoundException ;
1617use Symfony \Component \HttpFoundation \ResponseHeaderBag ;
1718use Symfony \Component \HttpFoundation \Session \Session ;
1819use Symfony \Component \HttpKernel \Event \FilterResponseEvent ;
@@ -82,7 +83,12 @@ public function onKernelResponse(FlashMessageResponseEvent $event)
8283 return ;
8384 }
8485
85- $ session = $ this ->session ?: $ event ->getRequest ()->getSession ();
86+ try {
87+ $ session = $ this ->session ?: $ event ->getRequest ()->getSession ();
88+ } catch (SessionNotFoundException $ e ) {
89+ return ;
90+ }
91+
8692 if (null === $ session ) {
8793 return ;
8894 }
You can’t perform that action at this time.
0 commit comments