r1226: Warnings-- when saving a usergroup
authorRobert Sesek <rsesek@bluestatic.org>
Sun, 1 Oct 2006 18:29:29 +0000 (18:29 +0000)
committerRobert Sesek <rsesek@bluestatic.org>
Sun, 1 Oct 2006 18:29:29 +0000 (18:29 +0000)
admin/usergroup.php
docs/changes.txt

index 61d5427bfd96a2fc6718575d2780a6e8a7baf029..69b49b1bb4dad15e83b68edeada18a3ac41d8469 100755 (executable)
@@ -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))
index b3b0b60c63f415e9901d465834f4c1c9da8b72ee..afa898ec175001d5c70afc89e49ff9581b5dff42 100644 (file)
@@ -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
 ===============================