Skip to content
Snippets Groups Projects
Unverified Commit 8daaf33e authored by Roeland Jago Douma's avatar Roeland Jago Douma
Browse files

Silence duplicate session warnings


Fixes #20490

Basically restroring the old behavior.

Signed-off-by: default avatarRoeland Jago Douma <roeland@famdouma.nl>
parent 9bd58553
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment