From fff1cb8d874a699dc21f636a87c190d4eb51eecd Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sun, 1 Oct 2006 18:29:29 +0000 Subject: [PATCH] r1226: Warnings-- when saving a usergroup --- admin/usergroup.php | 14 ++++++++++---- docs/changes.txt | 1 + 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/admin/usergroup.php b/admin/usergroup.php index 61d5427..69b49b1 100755 --- a/admin/usergroup.php +++ b/admin/usergroup.php @@ -218,9 +218,12 @@ if ($_POST['do'] == 'insert') $usergroup->insert(); $bugsys->input_clean('custom', TYPE_UINT); - foreach ($bugsys->in['custom'] AS $fieldid => $mask) + if (is_array($bugsys->in['custom'])) { - $values[] = $usergroup->insertid . ", " . $bugsys->clean($fieldid, TYPE_UINT) . ", " . $mask; + foreach ($bugsys->in['custom'] AS $fieldid => $mask) + { + $values[] = $usergroup->insertid . ", " . $bugsys->clean($fieldid, TYPE_UINT) . ", " . $mask; + } } if (is_array($values)) @@ -261,9 +264,12 @@ if ($_POST['do'] == 'update') $usergroup->update(); $bugsys->input_clean('custom', TYPE_UINT); - foreach ($bugsys->in['custom'] AS $fieldid => $mask) + if (is_array($bugsys->in['custom'])) { - $values[] = $usergroup->values['usergroupid'] . ", " . $bugsys->clean($fieldid, TYPE_UINT) . ", " . $mask; + foreach ($bugsys->in['custom'] AS $fieldid => $mask) + { + $values[] = $usergroup->values['usergroupid'] . ", " . $bugsys->clean($fieldid, TYPE_UINT) . ", " . $mask; + } } if (is_array($values)) diff --git a/docs/changes.txt b/docs/changes.txt index b3b0b60..afa898e 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -6,6 +6,7 @@ - Get rid of a foreach() warning if there are no products [admin/product.php#317] - If no custom fields were setup, an empty query error would be thrown [newreport.php#130] - If no custom fields were present, adding an automation would fail [admin/automation.php#74] +- Remove a warning when saving a usergroup and there are no custom fields present [admin/usergroup.php#221] 1.1.0 Release Candidate 1 =============================== -- 2.43.5