mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
ea43f6c1c8
Unfortunately, we can't simply use session_id() to regenerate the session id in unit tests. Starting from PHP 7.2, it would trigger "session_id(): Cannot change session id when headers already sent", refer to MDL-60978 and PHP bug #75628 for more details. As a workaround, we use a static property allowing us to inject the value that we then use as a session identifier. This is reasonably enough to make sure that the identifier is used as a part of the key prefix.