Skip to content

Commit

Permalink
Bug #6267 - questionlib.php delete_question infinite loop with rantom…
Browse files Browse the repository at this point in the history
… questions. Thanks to mbockol at carleton dot edu. Merged from MOODLE_16_STABLE.
  • Loading branch information
tjhunt committed Aug 16, 2006
1 parent 54121a7 commit 1d723a1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/questionlib.php
Expand Up @@ -416,7 +416,9 @@ function delete_question($questionid) {
// Now recursively delete all child questions
if ($children = get_records('question', 'parent', $questionid)) {
foreach ($children as $child) {
delete_question($child->id);
if ($child->id != $questionid) {
delete_question($child->id);
}
}
}

Expand Down

0 comments on commit 1d723a1

Please sign in to comment.