From: moodler Date: Thu, 21 Feb 2008 05:35:16 +0000 (+0000) Subject: MDL-13554 Fix from Mark Nielsen for bad block backups X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=eff1ecb4f101577d5a19b8888cf692c4d203a824;p=moodle.git MDL-13554 Fix from Mark Nielsen for bad block backups --- diff --git a/backup/restorelib.php b/backup/restorelib.php index 2c6fc07636..73cfc8df14 100644 --- a/backup/restorelib.php +++ b/backup/restorelib.php @@ -848,6 +848,11 @@ define('RESTORE_GROUPS_GROUPINGS', 3); 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 {