Skip to content

Commit

Permalink
MDL-13554 Fix from Mark Nielsen for bad block backups
Browse files Browse the repository at this point in the history
  • Loading branch information
moodler committed Feb 21, 2008
1 parent 5b2f502 commit 53f5364
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions backup/restorelib.php
Original file line number Diff line number Diff line change
Expand Up @@ -800,6 +800,11 @@ function restore_create_block_instances($restore,$xml_file) {
continue;
}
$getid = backup_getid($restore->backup_unique_code, $parts[1], $instance->pageid);

if (empty($getid->new_id)) {
// Failed, perhaps the module was not included in the restore MDL-13554
continue;
}
$instance->pageid = $getid->new_id;
}
else {
Expand Down

0 comments on commit 53f5364

Please sign in to comment.