Merge pull request #22247 from nextcloud/backport/22243/stable19
[stable19] Silence duplicate session warnings
This commit is contained in:
commit
7fffe82c57
|
@ -104,7 +104,7 @@ class Internal extends Session {
|
||||||
public function clear() {
|
public function clear() {
|
||||||
$this->invoke('session_unset');
|
$this->invoke('session_unset');
|
||||||
$this->regenerateId();
|
$this->regenerateId();
|
||||||
$this->startSession();
|
$this->startSession(true);
|
||||||
$_SESSION = [];
|
$_SESSION = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -213,11 +213,11 @@ class Internal extends Session {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private function startSession() {
|
private function startSession(bool $silence = false) {
|
||||||
if (PHP_VERSION_ID < 70300) {
|
if (PHP_VERSION_ID < 70300) {
|
||||||
$this->invoke('session_start');
|
$this->invoke('session_start', [], $silence);
|
||||||
} else {
|
} else {
|
||||||
$this->invoke('session_start', [['cookie_samesite' => 'Lax']]);
|
$this->invoke('session_start', [['cookie_samesite' => 'Lax']], $silence);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue