diff --git a/mod/forum/lib.php b/mod/forum/lib.php index 26f06c0fd41..eb63eecfcaf 100644 --- a/mod/forum/lib.php +++ b/mod/forum/lib.php @@ -4412,7 +4412,7 @@ function forum_delete_post($post, $children, $course, $cm, $forum, $skipcompleti $context = get_context_instance(CONTEXT_MODULE, $cm->id); - if ($children != 'ignore' && ($childposts = $DB->get_records('forum_posts', array('parent'=>$post->id)))) { + if ($children !== 'ignore' && ($childposts = $DB->get_records('forum_posts', array('parent'=>$post->id)))) { if ($children) { foreach ($childposts as $childpost) { forum_delete_post($childpost, true, $course, $cm, $forum, $skipcompletion);