From b38c35fe90d7d726b07a9bc637794990dbe78a5d Mon Sep 17 00:00:00 2001 From: Thomas Portelange Date: Mon, 27 Apr 2020 13:51:19 +0200 Subject: [PATCH] Fixes warning if session is not active See issue https://github.com/silverstripe/silverstripe-framework/issues/9496 --- src/Control/Session.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Control/Session.php b/src/Control/Session.php index e3c674b16..5fc0f6c1e 100644 --- a/src/Control/Session.php +++ b/src/Control/Session.php @@ -648,7 +648,7 @@ class Session */ public function regenerateSessionId() { - if (!headers_sent()) { + if (!headers_sent() && session_status() == PHP_SESSION_ACTIVE) { session_regenerate_id(true); } }