mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Merge pull request #8069 from cakephp/issue-#8062
Using _cookieName() instead session_name()
This commit is contained in:
commit
2751f4482d
1 changed files with 2 additions and 2 deletions
|
@ -591,7 +591,7 @@ class CakeSession {
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
protected static function _hasSession() {
|
protected static function _hasSession() {
|
||||||
return static::started() || isset($_COOKIE[session_name()]) || (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg');
|
return static::started() || isset($_COOKIE[static::_cookieName()]) || (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -757,7 +757,7 @@ class CakeSession {
|
||||||
if (session_id() === '') {
|
if (session_id() === '') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (isset($_COOKIE[session_name()])) {
|
if (isset($_COOKIE[static::_cookieName()])) {
|
||||||
setcookie(Configure::read('Session.cookie'), '', time() - 42000, static::$path);
|
setcookie(Configure::read('Session.cookie'), '', time() - 42000, static::$path);
|
||||||
}
|
}
|
||||||
if (!headers_sent()) {
|
if (!headers_sent()) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue