From 57aed80df6d62142b62e903669875de7fd830dfe Mon Sep 17 00:00:00 2001 From: Brendan Heywood Date: Mon, 12 Oct 2020 15:59:31 +1100 Subject: [PATCH] MDL-68983 cache: Fix bug with readonly session combined with lock debug --- lib/classes/session/manager.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/classes/session/manager.php b/lib/classes/session/manager.php index c3b0baa6194d1..8934080a8604f 100644 --- a/lib/classes/session/manager.php +++ b/lib/classes/session/manager.php @@ -1274,6 +1274,10 @@ public static function update_recent_session_locks($sessionlock) { return; } + if (defined('READ_ONLY_SESSION') && READ_ONLY_SESSION && !empty($CFG->enable_read_only_sessions)) { + return; + } + $SESSION->recentsessionlocks = self::get_recent_session_locks(); array_push($SESSION->recentsessionlocks, $sessionlock);