From be833e823c4b9cce6c85938667b89482a6439c21 Mon Sep 17 00:00:00 2001 From: nicolasconnault Date: Fri, 30 Mar 2007 06:32:10 +0000 Subject: [PATCH] handled another potential xhtml error: empty select when no members in group. --- group/index.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/group/index.php b/group/index.php index 4ccce4e82c..8918f30cf7 100644 --- a/group/index.php +++ b/group/index.php @@ -323,9 +323,12 @@ if ($success) { if (isset($userids)) { //&& is_array($userids) // Put the groupings into a hash and sort them $user_names = groups_userids_to_user_names($userids, $courseid); - - foreach ($user_names as $user) { - echo "\n"; + if(empty($user_names)) { + echo ''; + } else { + foreach ($user_names as $user) { + echo "\n"; + } } } else { // Print an empty option to avoid the XHTML error of having an empty select element -- 2.39.5