File tree Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 1
1
parameters:
2
- level: 1
2
+ level: 2
3
3
paths:
4
4
- src
Original file line number Diff line number Diff line change 15
15
use Symfony \Component \HttpFoundation \Cookie ;
16
16
use Symfony \Component \HttpFoundation \Exception \SessionNotFoundException ;
17
17
use Symfony \Component \HttpFoundation \ResponseHeaderBag ;
18
+ use Symfony \Component \HttpFoundation \Session \FlashBagAwareSessionInterface ;
18
19
use Symfony \Component \HttpKernel \Event \ResponseEvent ;
19
20
use Symfony \Component \HttpKernel \KernelEvents ;
20
21
use Symfony \Component \OptionsResolver \OptionsResolver ;
@@ -56,6 +57,9 @@ public function onKernelResponse(ResponseEvent $event): void
56
57
} catch (SessionNotFoundException ) {
57
58
return ;
58
59
}
60
+ if (!($ session instanceof FlashBagAwareSessionInterface)) {
61
+ return ;
62
+ }
59
63
60
64
// Flash messages are stored in the session. If there is none, there
61
65
// can't be any flash messages in it. $session->getFlashBag() would
Original file line number Diff line number Diff line change @@ -96,8 +96,9 @@ public static function getSubscribedEvents(): array
96
96
private function getAttributeTags (Request $ request ): array
97
97
{
98
98
// Check for _tag request attribute that is set when using Tag attribute
99
- /** @var $tagConfigurations Tag[] */
100
- if (!$ tagConfigurations = $ request ->attributes ->get ('_tag ' )) {
99
+ /** @var Tag[] $tagConfigurations */
100
+ $ tagConfigurations = $ request ->attributes ->get ('_tag ' );
101
+ if (!$ tagConfigurations ) {
101
102
return [];
102
103
}
103
104
You can’t perform that action at this time.
0 commit comments