Permalink
Browse files

Fixing #2654 changing the event to post_controller for session write_…

…close
  • Loading branch information...
1 parent 67dd0e9 commit 3fcbb725ebe64d6dae83647ca4958ef54a1b909f ixmatus committed Mar 1, 2010
Showing with 1 addition and 4 deletions.
  1. +1 −4 system/libraries/Session.php
@@ -179,7 +179,7 @@ protected function __construct($session_id = NULL)
// Close the session on system shutdown (run before sending the headers), so that
// the session cookie(s) can be written.
- Event::add('system.shutdown', array($this, 'write_close'));
+ Event::add('system.post_controller', array($this, 'write_close'));
// Singleton instance
Session::$instance = $this;
@@ -287,9 +287,6 @@ public function create($vars = NULL, $session_id = NULL)
// Start the session!
session_start();
- // Be sure session_write_close() is called post-controller
- Event::add('system.post_controller', array($this, 'write_close'));
-
// Put session_id in the session variable
$_SESSION['session_id'] = session_id();

0 comments on commit 3fcbb72

Please sign in to comment.