Merge branch 'MDL-34872-master' of git://github.com/FMCorz/moodle
authorDan Poltawski <dan@moodle.com>
Mon, 20 Aug 2012 04:10:01 +0000 (12:10 +0800)
committerDan Poltawski <dan@moodle.com>
Mon, 20 Aug 2012 04:10:01 +0000 (12:10 +0800)
backup/moodle2/backup_stepslib.php

index 24d7da9..78c0a45 100644 (file)
@@ -1835,7 +1835,7 @@ class backup_annotate_all_user_files extends backup_execution_step {
             'backupid' => $this->get_backupid(), 'itemname' => 'userfinal'));
         foreach ($rs as $record) {
             $userid = $record->itemid;
-            $userctx = context_user::instance($userid);
+            $userctx = context_user::instance($userid, IGNORE_MISSING);
             if (!$userctx) {
                 continue; // User has not context, sure it's a deleted user, so cannot have files
             }