Permalink
Browse files

MDL-40035: Avoid rebuild_course_cache always for empty course

  • Loading branch information...
1 parent d5e3d9a commit d4bbe8997f72f03d0ad14a6d45707a812193855b @tlevi tlevi committed with marinaglancy Jun 6, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/modinfolib.php
View
@@ -275,7 +275,7 @@ public function __construct($course, $userid) {
// Load sectioncache field into memory as PHP object and check it's valid
$sectioncache = unserialize($course->sectioncache);
- if (!is_array($sectioncache) || empty($sectioncache)) {
+ if (!is_array($sectioncache)) {
// hmm, something is wrong - let's fix it
rebuild_course_cache($course->id);
$course->sectioncache = $DB->get_field('course', 'sectioncache', array('id'=>$course->id));

0 comments on commit d4bbe89

Please sign in to comment.