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

I've received some examples of this these days.
This commit is contained in:
stronk7
2004-12-10 18:25:45 +00:00
parent c492f5fe27
commit 4d1aead12e
+10 -7
View File
@@ -937,13 +937,16 @@
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;
}
}
}
}