Permalink
Browse files

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

  • Loading branch information...
1 parent 16b5541 commit 0420f8dca0020fb2a509dbd410c9729bc51504ac @aolley aolley committed with sammarshallou Apr 5, 2011
Showing with 2 additions and 0 deletions.
  1. +2 −0 lib/modinfolib.php
View
@@ -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]);
}

0 comments on commit 0420f8d

Please sign in to comment.