Skip to content
Browse files

Correct instanceof condition.

  • Loading branch information...
1 parent 8a01dd5 commit b8df1620acebc0f1deb34afc530bc88d30bb5295 Drak committed Feb 11, 2012
View
2 src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php
@@ -147,7 +147,7 @@ public function toolbarAction($token, $position = null)
{
$request = $this->container->get('request');
- if (null !== $session = $request->getSession() && $session instanceof AutoExpireFlashBag) {
+ if (null !== $session = $request->getSession() && $session->getFlashBag() instanceof AutoExpireFlashBag) {
// keep current flashes for one more request if using AutoExpireFlashBag
$session->getFlashBag()->setAll($session->getFlashBag()->peekAll());
}
View
2 src/Symfony/Bundle/WebProfilerBundle/EventListener/WebDebugToolbarListener.php
@@ -72,7 +72,7 @@ public function onKernelResponse(FilterResponseEvent $event)
if ($response->headers->has('X-Debug-Token') && $response->isRedirect() && $this->interceptRedirects) {
$session = $request->getSession();
- if ($session instanceof AutoExpireFlashBag) {
+ if ($session->getFlashBag() instanceof AutoExpireFlashBag) {
// keep current flashes for one more request if using AutoExpireFlashBag
$session->getFlashBag()->setAll($session->getFlashBag()->peekAll());
}

0 comments on commit b8df162

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