Index: includes/form.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/form.inc,v
retrieving revision 1.289
diff -u -p -r1.289 form.inc
--- includes/form.inc	27 Sep 2008 19:47:42 -0000	1.289
+++ includes/form.inc	30 Sep 2008 07:58:09 -0000
@@ -2342,6 +2342,10 @@ function form_clean_id($id = NULL, $flus
   return $id;
 }
 
+function drupal_filter_array($element, &$form_state) {
+  $form_state['values'][$element['#name']] = array_keys(array_filter($form_state['values'][$element['#name']]));
+}
+
 /**
  * @} End of "defgroup form_api".
  */
Index: modules/book/book.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/book/book.admin.inc,v
retrieving revision 1.12
diff -u -p -r1.12 book.admin.inc
--- modules/book/book.admin.inc	5 Jul 2008 06:00:51 -0000	1.12
+++ modules/book/book.admin.inc	30 Sep 2008 07:58:13 -0000
@@ -35,6 +35,7 @@ function book_admin_settings() {
     '#options' => $types,
     '#description' => t('Select content types which users with the %add-perm permission will be allowed to add to the book hierarchy. Users with the %outline-perm permission can add all content types.', array('%add-perm' => t('add content to books'),  '%outline-perm' => t('administer book outlines'))),
     '#required' => TRUE,
+    '#element_validate' => array('drupal_filter_array'),
   );
   $form['book_child_type'] = array(
     '#type' => 'radios',
@@ -44,7 +45,6 @@ function book_admin_settings() {
     '#description' => t('The content type for the %add-child link must be one of those selected as an allowed book outline type.', array('%add-child' => t('Add child page'))),
     '#required' => TRUE,
   );
-  $form['array_filter'] = array('#type' => 'value', '#value' => TRUE);
   $form['#validate'][] = 'book_admin_settings_validate';
 
   return system_settings_form($form);
@@ -250,4 +250,3 @@ function theme_book_admin_table($form) {
 
   return theme('table', $header, $rows, array('id' => 'book-outline'));
 }
-
Index: modules/system/system.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.module,v
retrieving revision 1.624
diff -u -p -r1.624 system.module
--- modules/system/system.module	27 Sep 2008 19:47:43 -0000	1.624
+++ modules/system/system.module	30 Sep 2008 07:58:31 -0000
@@ -1217,9 +1217,6 @@ function system_settings_form_submit($fo
       variable_del($key);
     }
     else {
-      if (is_array($value) && isset($form_state['values']['array_filter'])) {
-        $value = array_keys(array_filter($value));
-      }
       variable_set($key, $value);
     }
   }
