From 89475b805d644e3b56e96cc1b88a5ce99d28eecd Mon Sep 17 00:00:00 2001 From: tjhunt Date: Tue, 5 Dec 2006 18:38:56 +0000 Subject: [PATCH] Fixed notice when restoring a backup file that was created with Users: none. --- backup/restorelib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backup/restorelib.php b/backup/restorelib.php index 2aa389d99c..c7147fda16 100644 --- a/backup/restorelib.php +++ b/backup/restorelib.php @@ -6197,7 +6197,7 @@ foreach ($assignments as $assignment) { $olduser = backup_getid($restore->backup_unique_code,"user",$assignment->userid); - if ($olduser->info == "notincourse") { // it's possible that user is not in the course + if (!$olduser || $olduser->info == "notincourse") { // it's possible that user is not in the course continue; } $assignment->userid = $olduser->new_id; // new userid here -- 2.39.5