Index: index.php
===================================================================
RCS file: /cvs/drupal/drupal/index.php,v
retrieving revision 1.82
diff -u -F^f -r1.82 index.php
--- index.php	21 Aug 2004 06:42:34 -0000	1.82
+++ index.php	8 Apr 2005 07:17:20 -0000
@@ -14,6 +14,9 @@
 include_once 'includes/common.inc';
 
 fix_gpc_magic();
+if (isset($_POST['form_checkboxes'])) {
+  fix_checkboxes();
+}
 
 $status = menu_execute_active_handler();
 switch ($status) {
Index: includes/common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/common.inc,v
retrieving revision 1.434
diff -u -F^f -r1.434 common.inc
--- includes/common.inc	6 Apr 2005 07:43:10 -0000	1.434
+++ includes/common.inc	8 Apr 2005 07:17:24 -0000
@@ -412,6 +412,14 @@ function fix_gpc_magic() {
   }
 }
 
+function fix_checkboxes() {
+  foreach ($_POST['form_checkboxes'] as $key) {
+    if (!array_key_exists($key, $_POST['edit'])) {
+      $_POST['edit'][$key] = array();
+    }
+  }
+}
+
 /**
  * @name Conversion
  * @{
@@ -1172,9 +1180,8 @@ function form_checkboxes($title, $name, 
       $choices .= '<label class="option"><input type="checkbox" class="form-checkbox" name="edit['. $name .'][]" value="'. $key .'"'. (in_array($key, $values) ? ' checked="checked"' : ''). drupal_attributes($attributes) .' /> '. $choice .'</label><br />';
     }
     // Note: because unchecked boxes are not included in the POST data, we
-    // include a form_hidden() which will be overwritten as soon as there is at
-    // least one checked box.
-    return form_hidden($name, 0) . theme('form_element', $title, $choices, $description, NULL, $required, _form_get_error($name));
+    // indicate that $name is a form_checkbox.
+    return '<input type="hidden" name="form_checkboxes[]" value="'. $name.'">' . theme('form_element', $title, $choices, $description, NULL, $required, _form_get_error($name));
   }
 }
 
