MDL-19288 fixed one more incorrect use of array_shift() which breaks array keys - thanks Colin Campbell; merged from MOODLE_19_STABLE

This commit is contained in:
skodak
2009-05-24 07:24:16 +00:00
parent 315efce701
commit d4ff178fa9
+3 -1
View File
@@ -2733,7 +2733,9 @@ function &get_fast_modinfo(&$course, $userid=0) {
// Ensure cache does not use too much RAM
if (count($cache) > MAX_MODINFO_CACHE_SIZE) {
array_shift($cache);
reset($cache);
$key = key($cache);
unset($cache[$key]);
}
return $cache[$course->id];