Skip to content

Commit 140e642

Browse files
author
Jacob Bare
authored
Merge pull request #4 from zarathustra323/zarathustra323-patch-1
Remove direct call to session_write_close()
2 parents a6e8a02 + a0acf05 commit 140e642

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Task/TaskManager.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,11 @@ public function isEnabled()
174174
public function execute(PostResponseEvent $event)
175175
{
176176
if ($this->isEnabled() && $this->masterRequest) {
177-
session_write_close();
177+
$session = $event->getRequest()->getSession();
178+
if (null !== $session) {
179+
// Saves the session, which calls PHP's session_write_close()
180+
$session->save();
181+
}
178182

179183
// Allow any loaded plugins to fire
180184
foreach ($this->getPlugins() as $plugin) {

0 commit comments

Comments
 (0)