]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-13554 Fix from Mark Nielsen for bad block backups
authormoodler <moodler>
Thu, 21 Feb 2008 05:35:16 +0000 (05:35 +0000)
committermoodler <moodler>
Thu, 21 Feb 2008 05:35:16 +0000 (05:35 +0000)
backup/restorelib.php

index 2c6fc076368329eaa04bfa1d6e6c839296de95c5..73cfc8df14da810fcbb4d8cb0069fdb8ac55ae09 100644 (file)
@@ -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 {