Skip to content
Permalink
Browse files

Fixes #332.

  • Loading branch information...
predominant committed Mar 26, 2010
1 parent d95e482 commit 9740029e9e2db239c54f8db53d69046e04ef0dbe
Showing with 7 additions and 7 deletions.
  1. +7 −7 cake/libs/session.php
@@ -120,9 +120,9 @@ class CakeSession extends Object {
* Session Started
*
* @var boolean
* @access public
* @access protected
*/
var $started = false;
var $_started = false;
/**
* Constructor.
*
@@ -174,15 +174,15 @@ function __construct($base = null, $start = true) {
* @access public
*/
function start() {
if ($this->started) {
if ($this->started()) {
return true;
}
if (function_exists('session_write_close')) {
session_write_close();
}
$this->__initSession();
$this->started = $this->__startSession();
return $this->started;
$this->_started = $this->__startSession();
return $this->started();
}
/**
* Determine if Session has been started.
@@ -191,7 +191,7 @@ function start() {
* @return boolean True if session has been started.
*/
function started() {
if (isset($_SESSION)) {
if (isset($_SESSION) && $this->_started) {

This comment has been minimized.

@0x20h

0x20h Apr 5, 2011

Contributor

This forces multiple session_write_close() calls in my projects. I wonder why that was put in as it enforces session#start() for each new session component/view helper. Do you remember why you put that in ?

return true;
}
return false;
@@ -223,7 +223,7 @@ function id($id = null) {
$this->id = $id;
session_id($this->id);
}
if (isset($_SESSION)) {
if ($this->started()) {
return session_id();
} else {
return $this->id;

0 comments on commit 9740029

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.