mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-02-07 12:36:25 +00:00
Added fix for #1442.
SessionHelper was creating a second instance of CakeSession which would call the session_start(). Added a second param that can be set to false so this does not happen anymore git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3771 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
d9113f5165
commit
f22dc77ea1
2 changed files with 33 additions and 32 deletions
|
@ -99,7 +99,8 @@ class CakeSession extends Object{
|
|||
*
|
||||
* @param string $base The base path for the Session
|
||||
*/
|
||||
function __construct($base = null) {
|
||||
function __construct($base = null, $start = true) {
|
||||
if($start === true) {
|
||||
$this->host = env('HTTP_HOST');
|
||||
|
||||
if (empty($base)) {
|
||||
|
@ -130,8 +131,8 @@ class CakeSession extends Object{
|
|||
session_cache_limiter ("must-revalidate");
|
||||
session_start();
|
||||
header ('P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM"');
|
||||
|
||||
$this->__checkValid();
|
||||
}
|
||||
parent::__construct();
|
||||
}
|
||||
/**
|
||||
|
|
|
@ -47,7 +47,7 @@ class SessionHelper extends AppHelper {
|
|||
*/
|
||||
function __construct($base = null) {
|
||||
if (!defined('AUTO_SESSION') || AUTO_SESSION == true) {
|
||||
$this->__Session =& new CakeSession($base);
|
||||
$this->__Session =& new CakeSession($base, false);
|
||||
} else {
|
||||
$this->__active = false;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue