From 0420f8dca0020fb2a509dbd410c9729bc51504ac Mon Sep 17 00:00:00 2001 From: Adam Olley Date: Tue, 5 Apr 2011 11:08:50 +0930 Subject: [PATCH] MDL-25191: Properly destroy all elements of the modinfo cache --- lib/modinfolib.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/modinfolib.php b/lib/modinfolib.php index f9994fee7ef..c2fc0d025b3 100644 --- a/lib/modinfolib.php +++ b/lib/modinfolib.php @@ -1074,6 +1074,8 @@ function get_fast_modinfo(&$course, $userid=0) { if (count($cache) > MAX_MODINFO_CACHE_SIZE) { reset($cache); $key = key($cache); + unset($cache[$key]->instances); + unset($cache[$key]->cms); unset($cache[$key]); }