When using views_handler_filter_many_to_one filters I'm noticing that any 0 values are not saved with the filter values.

I traced it back to views_handler_filter_in_operator.inc where the following code is found:


  function value_submit($form, &$form_state) {
    $form_state['values']['options']['value'] = array_filter($form_state['values']['options']['value']);
  }

where the array_filter() call ends up stripping any zero values.

Comments

merlinofchaos’s picture

This is because checkboxes fail if '0' is the key due to the way they are implemented in Drupal. The only real solution here is going to be to implement my own checkboxes that don't have this dumb limitation.

merlinofchaos’s picture

Status: Active » Fixed

I found a way around this. Take THAT, fapi!

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.