Skip to content

Commit b13aa66

Browse files
authored
Merge pull request #22243 from nextcloud/fix/20490/no_session_duplicate_warnings
Silence duplicate session warnings
2 parents bc19168 + 8daaf33 commit b13aa66

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

lib/private/Session/Internal.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public function remove(string $key) {
104104
public function clear() {
105105
$this->invoke('session_unset');
106106
$this->regenerateId();
107-
$this->startSession();
107+
$this->startSession(true);
108108
$_SESSION = [];
109109
}
110110

@@ -213,11 +213,11 @@ private function invoke(string $functionName, array $parameters = [], bool $sile
213213
}
214214
}
215215

216-
private function startSession() {
216+
private function startSession(bool $silence = false) {
217217
if (PHP_VERSION_ID < 70300) {
218-
$this->invoke('session_start');
218+
$this->invoke('session_start', [], $silence);
219219
} else {
220-
$this->invoke('session_start', [['cookie_samesite' => 'Lax']]);
220+
$this->invoke('session_start', [['cookie_samesite' => 'Lax']], $silence);
221221
}
222222
}
223223
}

0 commit comments

Comments
 (0)