Index: category.module
===================================================================
RCS file: /cvs/drupal/contributions/modules/category/category.module,v
retrieving revision 1.126
diff -u -r1.126 category.module
--- category.module	2 Feb 2007 08:03:41 -0000	1.126
+++ category.module	7 Feb 2007 20:15:52 -0000
@@ -1457,6 +1457,15 @@
       }
 
       $options = _category_node_select_options($cnid, $blank, $node_cats);
+
+      // Convert object-wrapped options to array
+      foreach ($options as $arrkey => $arrchoice) {
+        if (is_object($arrchoice)) {
+          unset($options[$arrkey]);
+          $options[key($arrchoice->option)] = $arrchoice->option[key($arrchoice->option)];
+        }
+      }
+      
       if (isset($options) && is_array($options)) {
         foreach ($options as $key => $value) {
           $parents_in_cont = FALSE;
@@ -1980,7 +1989,9 @@
   if ($tree) {
     foreach ($tree as $category) {
       if (!in_array($category->cid, $exclude) && node_access('view', node_load($category->cid))) {
-        $options[$category->cid] = str_repeat('-', $category->depth) . $category->title;
+        $choice = new stdClass();
+        $choice->option = array($category->cid => str_repeat('-', $category->depth) . $category->title);
+        $options[] = $choice;
       }
     }
     if (!$blank && !$value) {
