Skip to content

Commit

Permalink
Using _cookieName() instead session_name()
Browse files Browse the repository at this point in the history
  • Loading branch information
phpnut committed Jan 19, 2016
1 parent a530414 commit 7c37cf5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Cake/Model/Datasource/CakeSession.php
Expand Up @@ -591,7 +591,7 @@ protected static function _cookieName() {
* @return bool
*/
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');
}

/**
Expand Down Expand Up @@ -757,7 +757,7 @@ public static function renew() {
if (session_id() === '') {
return;
}
if (isset($_COOKIE[session_name()])) {
if (isset($_COOKIE[static::_cookieName()])) {
setcookie(Configure::read('Session.cookie'), '', time() - 42000, static::$path);
}
if (!headers_sent()) {
Expand Down

0 comments on commit 7c37cf5

Please sign in to comment.