Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixes #332.

  • Loading branch information...
commit 13a55b6cd862f567069148372ebf0cdf50e8d4c4 1 parent 7b17374
@predominant predominant authored
Showing with 7 additions and 7 deletions.
  1. +7 −7 cake/libs/cake_session.php
View
14 cake/libs/cake_session.php
@@ -118,9 +118,9 @@ class CakeSession extends Object {
* Session Started
*
* @var boolean
- * @access public
+ * @access protected
*/
- var $started = false;
+ var $_started = false;
/**
* Constructor.
*
@@ -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();
}
/**
@@ -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;
@@ -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;
Please sign in to comment.
Something went wrong with that request. Please try again.