MDL-25191: Properly destroy all elements of the modinfo cache

This commit is contained in:
Adam Olley
2011-05-27 13:28:55 +01:00
committed by sam marshall
parent 16b5541dd2
commit 0420f8dca0
+2
View File
@@ -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]);
}