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
|
||||
*
|
||||
* @var boolean
|
||||
* @access public
|
||||
* @access protected
|
||||
*/
|
||||
var $started = false;
|
||||
var $_started = false;
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
|
@ -192,15 +192,15 @@ class CakeSession extends Object {
|
|||
* @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 @@ class CakeSession extends Object {
|
|||
* @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 @@ class CakeSession extends Object {
|
|||
$this->id = $id;
|
||||
session_id($this->id);
|
||||
}
|
||||
if (isset($_SESSION)) {
|
||||
if ($this->started()) {
|
||||
return session_id();
|
||||
} else {
|
||||
return $this->id;
|
||||
|
|
Loading…
Reference in a new issue