From a6760c2b1c8b4cfa08ba77cd4037682d838582ba Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Fri, 14 Aug 2020 05:23:11 +0200 Subject: [PATCH] Silence duplicate session warnings Fixes #20490 Basically restroring the old behavior. Signed-off-by: Roeland Jago Douma --- lib/private/Session/Internal.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/private/Session/Internal.php b/lib/private/Session/Internal.php index ffe1653787..f08f4da52a 100644 --- a/lib/private/Session/Internal.php +++ b/lib/private/Session/Internal.php @@ -104,7 +104,7 @@ class Internal extends Session { public function clear() { $this->invoke('session_unset'); $this->regenerateId(); - $this->startSession(); + $this->startSession(true); $_SESSION = []; } @@ -213,11 +213,11 @@ class Internal extends Session { } } - private function startSession() { + private function startSession(bool $silence = false) { if (PHP_VERSION_ID < 70300) { - $this->invoke('session_start'); + $this->invoke('session_start', [], $silence); } else { - $this->invoke('session_start', [['cookie_samesite' => 'Lax']]); + $this->invoke('session_start', [['cookie_samesite' => 'Lax']], $silence); } } }