Skip to content

Commit

Permalink
MDL-73245 cache: Fix bug with session lock debugging
Browse files Browse the repository at this point in the history
When session lock debugging and read only sessions deubgging are both
enabled, session lock debugging becomes moot. This patch causes
the session lock deubgging code to exit early if read only sessions
debugging is enabled.
  • Loading branch information
cameron1729 committed Dec 6, 2021
1 parent 0b626ac commit 98775c2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/classes/session/manager.php
Expand Up @@ -1310,7 +1310,9 @@ public static function update_recent_session_locks($sessionlock) {
return;
}

if (defined('READ_ONLY_SESSION') && READ_ONLY_SESSION && !empty($CFG->enable_read_only_sessions)) {
$readonlysession = defined('READ_ONLY_SESSION') && READ_ONLY_SESSION;
$readonlydebugging = !empty($CFG->enable_read_only_sessions) || !empty($CFG->enable_read_only_sessions_debug);
if ($readonlysession && $readonlydebugging) {
return;
}

Expand Down

0 comments on commit 98775c2

Please sign in to comment.