diff --git a/src/Util/SessionWrapper.php b/src/Util/SessionWrapper.php index 6a3f0daa9..3200efd2f 100644 --- a/src/Util/SessionWrapper.php +++ b/src/Util/SessionWrapper.php @@ -29,8 +29,10 @@ public function destroy() : void ); } - session_destroy(); - session_regenerate_id(); + if (session_status() === PHP_SESSION_ACTIVE) { + session_destroy(); + session_regenerate_id(); + } } public function find(string $key) : mixed