Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Silence duplicate session warnings
Fixes #20490

Basically restroring the old behavior.

Signed-off-by: Roeland Jago Douma <[email protected]>
  • Loading branch information
rullzer committed Aug 14, 2020
commit 8daaf33e3d625a313c1560f07061bd3970dfd087
8 changes: 4 additions & 4 deletions lib/private/Session/Internal.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public function remove(string $key) {
public function clear() {
$this->invoke('session_unset');
$this->regenerateId();
$this->startSession();
$this->startSession(true);
$_SESSION = [];
}

Expand Down Expand Up @@ -213,11 +213,11 @@ private function invoke(string $functionName, array $parameters = [], bool $sile
}
}

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);
}
}
}