Don't write session cookie if headers have already been sent.
This commit is contained in:
parent
11ac2919f8
commit
4585f25092
|
@ -35,9 +35,12 @@ public function load($id)
|
||||||
*/
|
*/
|
||||||
public function save($session)
|
public function save($session)
|
||||||
{
|
{
|
||||||
$c = \System\Config::get('session');
|
if ( ! headers_sent())
|
||||||
|
{
|
||||||
|
extract(Config::get('session'));
|
||||||
|
|
||||||
\System\Cookie::put('session_payload', Crypt::encrypt(serialize($session)), $c['lifetime'], $c['path'], $c['domain'], $c['https'], $c['http_only']);
|
\System\Cookie::put('session_payload', Crypt::encrypt(serialize($session)), $lifetime, $path, $domain, $https, $http_only);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue