Bug #6267 - questionlib.php delete_question infinite loop with rantom questions. Thanks to mbockol at carleton dot edu.
This commit is contained in:
+3
-1
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user