Session now prevents cache headers being sent unintentionally

This commit is contained in:
Damian Mooyman 2018-06-14 15:54:31 +12:00
parent 779865e29f
commit b686b86c34

View File

@ -128,6 +128,15 @@ class Session
*/
private static $cookie_secure = false;
/**
* Name of session cache limiter to use.
* Defaults to '' to disable cache limiter entirely.
*
* @see https://secure.php.net/manual/en/function.session-cache-limiter.php
* @var string|null
*/
private static $sessionCacheLimiter = '';
/**
* Session data.
* Will be null if session has not been started
@ -275,6 +284,11 @@ class Session
session_name('SECSESSID');
}
$limiter = $this->config()->get('sessionCacheLimiter');
if (isset($limiter)) {
session_cache_limiter($limiter);
}
session_start();
$this->data = isset($_SESSION) ? $_SESSION : array();