Skipping empty categories in restore. They shouldn't exist but

I've received some examples of this these days.

Merged from MOODLE_14_STABLE
This commit is contained in:
stronk7 2004-12-10 18:27:53 +00:00
parent 1372b482df
commit b5104c34f1

View file

@ -990,6 +990,8 @@
if ($info !== true) {
//Iterate over each category
foreach ($info as $category) {
//Skip empty categories (some backups can contain them)
if (!empty($category->id)) {
$catrestore = "quiz_restore_question_categories";
if (function_exists($catrestore)) {
//print_object ($category); //Debug
@ -1000,6 +1002,7 @@
}
}
}
}
} else {
$status = false;
}