Skip to content

Commit 97cd17d

Browse files
author
Jacob Bare
authored
Merge pull request #7 from as3io/session-started
Ensure session is started before saving it
2 parents b13675b + 5aa95ed commit 97cd17d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Task/TaskManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ public function execute(PostResponseEvent $event)
175175
{
176176
if ($this->isEnabled() && $this->masterRequest) {
177177
$session = $event->getRequest()->getSession();
178-
if (null !== $session) {
178+
if (null !== $session && $session->isStarted()) {
179179
// Saves the session, which calls PHP's session_write_close()
180180
$session->save();
181181
}

0 commit comments

Comments
 (0)