Skip to content
Browse files

Bug #6267 - questionlib.php delete_question infinite loop with rantom…

… questions. Thanks to mbockol at carleton dot edu.
  • Loading branch information...
1 parent 48e2bf1 commit da4714358a46f54927a69bb2d5e98d80df7be0c3 tjhunt committed Aug 16, 2006
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/questionlib.php
View
4 lib/questionlib.php
@@ -376,7 +376,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);
+ }
}
}

0 comments on commit da47143

Please sign in to comment.
Something went wrong with that request. Please try again.