Skip to content

Commit

Permalink
MDL-25191: Properly destroy all elements of the modinfo cache
Browse files Browse the repository at this point in the history
  • Loading branch information
aolley authored and sammarshallou committed May 27, 2011
1 parent 16b5541 commit 0420f8d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/modinfolib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
}

Expand Down

0 comments on commit 0420f8d

Please sign in to comment.