diff --git a/modules/contrib/views/views.module b/modules/contrib/views/views.module index aab3812..e69a2fd 100644 --- a/modules/contrib/views/views.module +++ b/modules/contrib/views/views.module @@ -2108,6 +2108,26 @@ function views_exposed_form_submit(&$form, &$form_state) { foreach ($form_state['values'] as $key => $value) { if (!in_array($key, $exclude)) { $form_state['view']->exposed_raw_input[$key] = $value; + + // If we have a multiple checkbox with values set to zero, we don't want + // these included in the exposed_raw_input array as it breaks pagination. + if (is_array($value)) { + $field = isset($form[$key]) ? $form[$key] : NULL; + + if ($field === NULL) { + // The field may be burried in a fieldset somewhere so find it. + foreach (element_children($form) as $child) { + if (isset($form[$child][$key])) { + $field = $form[$child][$key]; + continue; + } + } + } + + if (isset($field['#type']) && $field['#type'] === 'checkboxes') { + $form_state['view']->exposed_raw_input[$key] = array_filter($value); + } + } } } }