Closed (fixed)
Project:
Views (for Drupal 7)
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
14 Sep 2008 at 21:07 UTC
Updated:
8 Oct 2008 at 22:34 UTC
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
Comment #1
merlinofchaos commentedThis 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.
Comment #2
merlinofchaos commentedI found a way around this. Take THAT, fapi!
Comment #3
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.