diff --git a/lib/private/Session/Internal.php b/lib/private/Session/Internal.php index 285b6fd796037..4966bb3d55953 100644 --- a/lib/private/Session/Internal.php +++ b/lib/private/Session/Internal.php @@ -103,7 +103,9 @@ public function remove(string $key) { public function clear() { $this->invoke('session_unset'); $this->regenerateId(); - $this->startSession(true); + if(!isset($_SESSION)){ + $this->startSession(true); + } $_SESSION = []; }