Permalink
Browse files

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

  • Loading branch information...
aolley authored and sammarshallou committed Apr 5, 2011
1 parent da63c93 commit c281550ce5f2b4466161f7b490616536dc2f9163
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 c281550

Please sign in to comment.