]> source.dussan.org Git - nextcloud-server.git/commitdiff
Silence duplicate session warnings 22243/head
authorRoeland Jago Douma <roeland@famdouma.nl>
Fri, 14 Aug 2020 03:23:11 +0000 (05:23 +0200)
committerRoeland Jago Douma <roeland@famdouma.nl>
Fri, 14 Aug 2020 03:23:11 +0000 (05:23 +0200)
Fixes #20490

Basically restroring the old behavior.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
lib/private/Session/Internal.php

index ffe16537874695af3555f9e017cf33ba878a4004..f08f4da52a7abe2f9eb925d7a372e97c2c859011 100644 (file)
@@ -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);
                }
        }
 }