Skip to content
Browse files

MDL-40035: Avoid rebuild_course_cache always for empty course

  • Loading branch information...
1 parent b7aac8b commit 954ba4bce4ad0e21e0219878f6bc17e64370cbb4 @tlevi tlevi committed with marinaglancy Jun 6, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/modinfolib.php
View
2 lib/modinfolib.php
@@ -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 954ba4b

Please sign in to comment.
Something went wrong with that request. Please try again.