Skip to content

Commit

Permalink
Fixes #332.
Browse files Browse the repository at this point in the history
  • Loading branch information
predominant committed Mar 26, 2010
1 parent 7b17374 commit 13a55b6
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions cake/libs/cake_session.php
Expand Up @@ -118,9 +118,9 @@ class CakeSession extends Object {
* Session Started
*
* @var boolean
* @access public
* @access protected
*/
var $started = false;
var $_started = false;
/**
* Constructor.
*
Expand Down Expand Up @@ -192,15 +192,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();
}

/**
Expand All @@ -210,7 +210,7 @@ function start() {
* @return boolean True if session has been started.
*/
function started() {
if (isset($_SESSION)) {
if (isset($_SESSION) && $this->_started) {
return true;
}
return false;
Expand Down Expand Up @@ -243,7 +243,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;
Expand Down

0 comments on commit 13a55b6

Please sign in to comment.