diff --git a/main/forum/forumfunction.inc.php b/main/forum/forumfunction.inc.php index 2a0a307eb1..f6f81c0e4a 100755 --- a/main/forum/forumfunction.inc.php +++ b/main/forum/forumfunction.inc.php @@ -718,8 +718,8 @@ function store_forum($values, $courseInfo = array(), $returnId = false) 'forum_of_group'=> isset($values['group_forum']) ? $values['group_forum'] : null, 'forum_group_public_private'=> isset($values['public_private_group_forum_group']['public_private_group_forum']) ? $values['public_private_group_forum_group']['public_private_group_forum'] : null, 'moderated'=> isset($values['moderated']['moderated']) ? 1 : 0, - 'start_time' => isset($values['start_time']) ? api_get_utc_datetime($values['start_time']) : null, - 'end_time' => isset($values['end_time']) ? api_get_utc_datetime($values['end_time']) : null, + 'start_time' => !empty($values['start_time']) ? api_get_utc_datetime($values['start_time']) : null, + 'end_time' => !empty($values['end_time']) ? api_get_utc_datetime($values['end_time']) : null, 'forum_order'=> isset($new_max) ? $new_max : null, 'session_id'=> $session_id, 'lp_id' => isset($values['lp_id']) ? intval($values['lp_id']) : 0 @@ -761,8 +761,8 @@ function store_forum($values, $courseInfo = array(), $returnId = false) 'forum_of_group'=> isset($values['group_forum']) ? $values['group_forum'] : null, 'forum_group_public_private'=> isset($values['public_private_group_forum_group']['public_private_group_forum']) ? $values['public_private_group_forum_group']['public_private_group_forum'] : null, 'moderated'=> isset($values['moderated']['moderated']) ? 1 : 0, - 'start_time' => isset($values['start_time']) ? api_get_utc_datetime($values['start_time']) : null, - 'end_time' => isset($values['end_time']) ? api_get_utc_datetime($values['end_time']) : null, + 'start_time' => !empty($values['start_time']) ? api_get_utc_datetime($values['start_time']) : null, + 'end_time' => !empty($values['end_time']) ? api_get_utc_datetime($values['end_time']) : null, 'forum_order'=> isset($new_max) ? $new_max : null, 'session_id'=> $session_id, 'lp_id' => isset($values['lp_id']) ? intval($values['lp_id']) : 0,