Permalink
Browse files

Fixes MDL17792 cron break effect

  • Loading branch information...
1 parent 507c75f commit d8b7674ec5c690258b188164a25349e8a04ac513 diml committed Jan 6, 2009
Showing with 7 additions and 2 deletions.
  1. +3 −1 search/documents/assignment_document.php
  2. +4 −1 search/update.php
View
4 search/documents/assignment_document.php
@@ -221,7 +221,9 @@ function assignment_single_document($id, $itemtype) {
}
} elseif ($itemtype == 'submission') {
if ($submission = get_record('assignment_submissions', 'id', $id)){
- $assignment = get_record('assignment', 'id', $submission->assignment);
+ if (!$assignment = get_record('assignment', 'id', $submission->assignment)){
+ return null;
+ }
} else {
return null;
}
View
5 search/update.php
@@ -125,7 +125,10 @@
}
//add new modified document back into index
- $add = $get_document_function($update->id, $update->itemtype);
+ if (!$add = $get_document_function($update->id, $update->itemtype)){
+ // ignore on errors
+ continue;
+ }
//object to insert into db
$dbid = $dbcontrol->addDocument($add);

0 comments on commit d8b7674

Please sign in to comment.