Permalink
Browse files

MDL-40035: Avoid rebuild_course_cache always for empty course

  • Loading branch information...
1 parent ffbb1a2 commit 94e36bc01fc31f389620079840270c2325638309 @tlevi tlevi committed with marinaglancy Jun 6, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/modinfolib.php
View
@@ -257,7 +257,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 94e36bc

Please sign in to comment.