Skip to content

Commit

Permalink
Merge branch 'w05_MDL-26172_20_groupupgrade' of git://github.com/skod…
Browse files Browse the repository at this point in the history
…ak/moodle
  • Loading branch information
stronk7 committed Jan 31, 2011
2 parents 7164db6 + 73af286 commit 9700d68
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/db/upgradelib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand Down

0 comments on commit 9700d68

Please sign in to comment.