Skip to content

Commit

Permalink
Prevent WDT from creating a session
Browse files Browse the repository at this point in the history
  • Loading branch information
Miha Vrhovnik committed Jan 9, 2014
1 parent a5b4aad commit 4791351
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -227,7 +227,7 @@ public function toolbarAction(Request $request, $token)

$session = $request->getSession();

if (null !== $session && $session->getFlashBag() instanceof AutoExpireFlashBag) {
if (null !== $session && $session->isStarted() && $session->getFlashBag() instanceof AutoExpireFlashBag) {
// keep current flashes for one more request if using AutoExpireFlashBag
$session->getFlashBag()->setAll($session->getFlashBag()->peekAll());
}
Expand Down
Expand Up @@ -67,7 +67,7 @@ public function onKernelResponse(FilterResponseEvent $event)

if ($response->headers->has('X-Debug-Token') && $response->isRedirect() && $this->interceptRedirects) {
$session = $request->getSession();
if ($session && $session->getFlashBag() instanceof AutoExpireFlashBag) {
if (null !== $session && $session->isStarted() && $session->getFlashBag() instanceof AutoExpireFlashBag) {
// keep current flashes for one more request if using AutoExpireFlashBag
$session->getFlashBag()->setAll($session->getFlashBag()->peekAll());
}
Expand Down

0 comments on commit 4791351

Please sign in to comment.