/**
* Set session cookie parameters
*
* @return void
*
* @since 4.0.0
*/
protected function setCookieParams() : void
{
if (headers_sent() || $this->isActive()) {
return;
}
$cookie = session_get_cookie_params();
if ($this->forceSSL) {
$cookie['secure'] = true;
}
$app = Factory::getApplication();
if ($app->get('cookie_domain', '') != '') {
$cookie['domain'] = $app->get('cookie_domain');
}
if ($app->get('cookie_path', '') != '') {
$cookie['path'] = $app->get('cookie_path');
}
session_set_cookie_params($cookie['lifetime'], $cookie['path'], $cookie['domain'], $cookie['secure'], true);
}