Skip to content
This repository
Browse code

Correct instanceof condition.

  • Loading branch information...
commit b8df1620acebc0f1deb34afc530bc88d30bb5295 1 parent 8a01dd5
Drak drak authored
2  src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php
@@ -147,7 +147,7 @@ public function toolbarAction($token, $position = null)
147 147 {
148 148 $request = $this->container->get('request');
149 149
150   - if (null !== $session = $request->getSession() && $session instanceof AutoExpireFlashBag) {
  150 + if (null !== $session = $request->getSession() && $session->getFlashBag() instanceof AutoExpireFlashBag) {
151 151 // keep current flashes for one more request if using AutoExpireFlashBag
152 152 $session->getFlashBag()->setAll($session->getFlashBag()->peekAll());
153 153 }
2  src/Symfony/Bundle/WebProfilerBundle/EventListener/WebDebugToolbarListener.php
@@ -72,7 +72,7 @@ public function onKernelResponse(FilterResponseEvent $event)
72 72
73 73 if ($response->headers->has('X-Debug-Token') && $response->isRedirect() && $this->interceptRedirects) {
74 74 $session = $request->getSession();
75   - if ($session instanceof AutoExpireFlashBag) {
  75 + if ($session->getFlashBag() instanceof AutoExpireFlashBag) {
76 76 // keep current flashes for one more request if using AutoExpireFlashBag
77 77 $session->getFlashBag()->setAll($session->getFlashBag()->peekAll());
78 78 }

0 comments on commit b8df162

Please sign in to comment.
Something went wrong with that request. Please try again.