MDL-81480 core: Sets user-level session storage functions

Also added @runInSeparateProcess on each session Redis cluster test to let the test run
in a separate process to avoid the error "the headers are not already sent" by PHPUnit.
This commit is contained in:
meirzamoodle
2024-04-10 17:27:20 +07:00
parent b621a7e4b3
commit c9cb89323c
3 changed files with 8 additions and 0 deletions
+5
View File
@@ -213,6 +213,11 @@ class redis extends handler implements SessionHandlerInterface {
throw new exception('sessionhandlerproblem', 'error', '', null, 'redis extension version must be at least 2.0');
}
$result = session_set_save_handler($this);
if (!$result) {
throw new exception('redissessionhandlerproblem', 'error');
}
$encrypt = (bool) ($this->sslopts ?? false);
// Set Redis server(s).
$trimmedservers = [];