Remove cookie on pre install page

This commit is contained in:
Jack Anderson 2024-10-14 09:24:34 +01:00 committed by y.yerli
parent fc0079726e
commit e36e287669

View file

@ -45,6 +45,14 @@ use Monolog\Logger;
require __DIR__ . '/../config/bootstrap.php';
require __DIR__ . '/../vendor/autoload.php';
$log = new Logger('install.log');
$sessionName = 'SCRMSESSID';
$sessionId = $_COOKIE[$sessionName] ?? false;
if (!empty($sessionId) && session_status() === PHP_SESSION_ACTIVE) {
session_destroy();
}
setcookie($sessionName, false, 1, '/');
$log->pushHandler(new StreamHandler('../logs/install.log', Logger::DEBUG));
(new InstallPreChecks($log))->setupTwigTemplate();