MDL-73245 cache: Fix bug with session lock debugging

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.
This commit is contained in:
Cameron Ball 2021-12-03 09:10:04 +08:00
parent 0b626ac5e0
commit 98775c265b

View file

@ -1310,7 +1310,9 @@ class manager {
return; 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; return;
} }