]> git.mjollnir.org Git - moodle.git/commitdiff
Fix notice.
authortjhunt <tjhunt>
Thu, 15 Mar 2007 12:52:50 +0000 (12:52 +0000)
committertjhunt <tjhunt>
Thu, 15 Mar 2007 12:52:50 +0000 (12:52 +0000)
mod/quiz/editlib.php

index 0b30797076ae10745efe8585ee82848fd8dc4dc3..c6038032805e734d5fb3800cbcec69f60e223567 100644 (file)
@@ -36,7 +36,7 @@ function quiz_delete_quiz_question($id, &$modform) {
     unset($questions[$id]);
     // If we deleted the question at the top and it was followed by
     // a page break then delete page break as well
-    if ($id == 0 and $questions[1] == 0) {
+    if ($id == 0 && count($questions) > 1 && $questions[1] == 0) {
         unset($questions[1]);
     }
     $modform->questions = implode(",", $questions);