=== modified file 'modules/workflow/includes/workflow_views_handler_filter_sid.inc'
--- modules/workflow/includes/workflow_views_handler_filter_sid.inc	2009-01-13 13:27:08 +0000
+++ modules/workflow/includes/workflow_views_handler_filter_sid.inc	2009-02-09 15:42:55 +0000
@@ -12,6 +12,48 @@
 class workflow_views_handler_filter_sid extends views_handler_filter_in_operator {
   var $value_form_type = 'select';
 
+  function reduce_value_options($input = NULL) {
+    if (!isset($input)) {
+      $input = $this->value_options;
+    }
+    // Because options may be an array of strings, or an array of mixed arrays
+    // and strings (optgroups) or an array of objects, we have to
+    // step through and handle each one individually.
+    $options = array();
+    foreach ($input as $id => $option) {
+      if (is_array($option)) {
+        // skip empty option group
+        if ($result = $this->reduce_value_options($option)) {
+          $options[$id] = $this->reduce_value_options($option);
+        }
+        continue;
+      }
+      else if (is_object($option)) {
+        $keys = array_keys($option->option);
+        $key = array_shift($keys);
+        if (isset($this->value[$key])) {
+          $options[$id] = $option;
+        }
+      }
+      else if (isset($this->value[$id])) {
+        $options[$id] = $option;
+      }
+    }
+    // make it flat in case of only one option group
+    if (count($options) == 1) { // only one element
+      $first_element = array_shift($options);
+      if (is_array($first_element)) {
+        return $first_element;
+      }
+      else {
+        return $options;
+      }
+    }
+    else {
+      return $options;
+    }
+  }
+  
   function get_value_options() {
     if (!isset($this->value_options)) {
       $this->value_title = t('Workflow state');

