Browse Source

Merge pull request #22243 from nextcloud/fix/20490/no_session_duplicate_warnings

Silence duplicate session warnings
pull/22257/head
Morris Jobke 5 years ago
committed by GitHub
parent
commit
b13aa660c9
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      lib/private/Session/Internal.php

8
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);
}
}
}
Loading…
Cancel
Save