From 4b0b1c405c5dd242fdef37930502dd4341222c3d Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Sat, 2 Oct 2021 12:58:57 +0200 Subject: Don't use suppression operator for "session_start" Don't use the suppression operator "@" for the "session_start" call in the migrations.php file, but rather check properly if there already is an active session by checking the "session_status" return value. --- core/migrations.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'core/migrations.php') diff --git a/core/migrations.php b/core/migrations.php index 1ddeefd..52cf31d 100644 --- a/core/migrations.php +++ b/core/migrations.php @@ -8,7 +8,9 @@ $Migrator = Application::getMigrator(); # Check for outstanding database schema migrations #=============================================================================== if($Migrator->isMigrationNeeded()) { - @session_start(); + if(session_status() !== PHP_SESSION_ACTIVE) { + session_start(); + } Application::set('TEMPLATE.NAME', Application::get('ADMIN.TEMPLATE')); Application::set('TEMPLATE.LANG', Application::get('ADMIN.LANGUAGE')); -- cgit v1.2.3