Permalink
Browse files

Merge branch 'w05_MDL-26172_20_groupupgrade' of git://github.com/skod…

…ak/moodle
  • Loading branch information...
2 parents 7164db6 + 73af286 commit 9700d6835df8c7fe00a18c1eed4e62de25623c37 @stronk7 stronk7 committed Jan 31, 2011
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/db/upgradelib.php
View
@@ -244,7 +244,10 @@ function upgrade_migrate_group_icons() {
upgrade_set_timeout(60); /// Give upgrade at least 60 more seconds
$pbar->update($i, $count, "Migrated group icons $i/$count.");
- $context = get_context_instance(CONTEXT_COURSE, $group->courseid);
+ if (!$context = get_context_instance(CONTEXT_COURSE, $group->courseid)) {
+ debugging('Invalid group record (id=' . $group->id . ') found.');
+ continue;
+ }
if ($fs->file_exists($context->id, 'group', 'icon', $group->id, '/', 'f1.jpg')) {
// already converted!

0 comments on commit 9700d68

Please sign in to comment.