mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Fixes #332.
This commit is contained in:
parent
7b17374cad
commit
13a55b6cd8
1 changed files with 7 additions and 7 deletions
|
@ -118,9 +118,9 @@ class CakeSession extends Object {
|
||||||
* Session Started
|
* Session Started
|
||||||
*
|
*
|
||||||
* @var boolean
|
* @var boolean
|
||||||
* @access public
|
* @access protected
|
||||||
*/
|
*/
|
||||||
var $started = false;
|
var $_started = false;
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*
|
*
|
||||||
|
@ -192,15 +192,15 @@ class CakeSession extends Object {
|
||||||
* @access public
|
* @access public
|
||||||
*/
|
*/
|
||||||
function start() {
|
function start() {
|
||||||
if ($this->started) {
|
if ($this->started()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (function_exists('session_write_close')) {
|
if (function_exists('session_write_close')) {
|
||||||
session_write_close();
|
session_write_close();
|
||||||
}
|
}
|
||||||
$this->__initSession();
|
$this->__initSession();
|
||||||
$this->started = $this->__startSession();
|
$this->_started = $this->__startSession();
|
||||||
return $this->started;
|
return $this->started();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -210,7 +210,7 @@ class CakeSession extends Object {
|
||||||
* @return boolean True if session has been started.
|
* @return boolean True if session has been started.
|
||||||
*/
|
*/
|
||||||
function started() {
|
function started() {
|
||||||
if (isset($_SESSION)) {
|
if (isset($_SESSION) && $this->_started) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -243,7 +243,7 @@ class CakeSession extends Object {
|
||||||
$this->id = $id;
|
$this->id = $id;
|
||||||
session_id($this->id);
|
session_id($this->id);
|
||||||
}
|
}
|
||||||
if (isset($_SESSION)) {
|
if ($this->started()) {
|
||||||
return session_id();
|
return session_id();
|
||||||
} else {
|
} else {
|
||||||
return $this->id;
|
return $this->id;
|
||||||
|
|
Loading…
Reference in a new issue