diff --git a/dept_groups.php b/dept_groups.php index 0f31d8349..2e921287d 100644 --- a/dept_groups.php +++ b/dept_groups.php @@ -21,7 +21,7 @@ // Update if form was submitted and action is set if(isset($_POST['action']) && $_POST['action']=="Submit"){ - $grpMembers=$_POST['chosen']; + $grpMembers=!empty($_POST['chosen'])?$_POST['chosen']:array(); $dept->AssignContacts($grpMembers); } diff --git a/people_depts.php b/people_depts.php index 674d908a3..4cd3f4e41 100644 --- a/people_depts.php +++ b/people_depts.php @@ -21,7 +21,7 @@ // Update if form was submitted and action is set if(isset($_POST['action']) && $_POST['action']=="Submit"){ - $grpMembers=$_POST['chosen']; + $grpMembers=!empty($_POST['chosen'])?$_POST['chosen']:array(); $person->AssignDepartments($grpMembers); } diff --git a/project_members.php b/project_members.php index caad5a502..af16dce55 100644 --- a/project_members.php +++ b/project_members.php @@ -30,7 +30,7 @@ // Update if form was submitted and action is set if(isset($_POST['action']) && $_POST['action']=="Submit"){ - $grpMembers=$_POST['chosen']; + $grpMembers=!empty($_POST['chosen'])?$_POST['chosen']:array(); if (( sizeof( $grpMembers ) > 0 ) && isset( $_REQUEST['projectid'] )) { $ProjectID = $_REQUEST['projectid']; ProjectMembership::clearMembership( $ProjectID );