diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2020-08-14 05:23:11 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2020-08-14 05:23:11 +0200 |
commit | 8daaf33e3d625a313c1560f07061bd3970dfd087 (patch) | |
tree | 6f537e966532f0a7a3412dc31e4f33ea2dc573f8 /lib/private/Session | |
parent | 9bd58553db74dbc9d7d317fcd6886f1f20431b5a (diff) | |
download | nextcloud-server-8daaf33e3d625a313c1560f07061bd3970dfd087.tar.gz nextcloud-server-8daaf33e3d625a313c1560f07061bd3970dfd087.zip |
Silence duplicate session warnings
Fixes #20490
Basically restroring the old behavior.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib/private/Session')
-rw-r--r-- | lib/private/Session/Internal.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/private/Session/Internal.php b/lib/private/Session/Internal.php index ffe16537874..f08f4da52a7 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); } } } |