Bug #6267 - questionlib.php delete_question infinite loop with rantom questions. Thanks to mbockol at carleton dot edu.

This commit is contained in:
tjhunt
2006-08-16 16:16:42 +00:00
parent 48e2bf159a
commit da4714358a
+3 -1
View File
@@ -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);
}
}
}