if ($info !== true) {
//Iterate over each category
foreach ($info as $category) {
- $catrestore = "quiz_restore_question_categories";
- if (function_exists($catrestore)) {
- //print_object ($category); //Debug
- $status = $catrestore($category,$restore);
- } else {
- //Something was wrong. Function should exist.
- $status = false;
+ //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
+ $status = $catrestore($category,$restore);
+ } else {
+ //Something was wrong. Function should exist.
+ $status = false;
+ }
}
}
}