Index: wp-includes/taxonomy.php
===================================================================
--- wp-includes/taxonomy.php	(revision 12594)
+++ wp-includes/taxonomy.php	(working copy)
@@ -545,18 +545,19 @@
  * hide_empty - Default is true. Will not return empty terms, which means
  * terms whose count is 0 according to the given taxonomy.
  *
- * exclude - Default is an empty string.  A comma- or space-delimited string
+ * exclude - Default is an empty array.  An array, comma- or space-delimited string
  * of term ids to exclude from the return array.  If 'include' is non-empty,
  * 'exclude' is ignored.
  *
- * exclude_tree - A comma- or space-delimited string of term ids to exclude
- * from the return array, along with all of their descendant terms according to
- * the primary taxonomy.  If 'include' is non-empty, 'exclude_tree' is ignored.
+ * exclude_tree - Default is an empty array.  An array, comma- or space-delimited 
+ * string of term ids to exclude from the return array, along with all of their 
+ * descendant terms according to the primary taxonomy.  If 'include' is non-empty, 
+ * 'exclude_tree' is ignored.
  *
- * include - Default is an empty string.  A comma- or space-delimited string
+ * include - Default is an empty array.  An array, comma- or space-delimited string
  * of term ids to include in the return array.
  *
- * number - The maximum number of terms to return.  Default is empty.
+ * number - The maximum number of terms to return.  Default is empty string.
  *
  * offset - The number by which to offset the terms query.
  *
@@ -625,7 +626,7 @@
 	$in_taxonomies = "'" . implode("', '", $taxonomies) . "'";
 
 	$defaults = array('orderby' => 'name', 'order' => 'ASC',
-		'hide_empty' => true, 'exclude' => '', 'exclude_tree' => '', 'include' => '',
+		'hide_empty' => true, 'exclude' => array(), 'exclude_tree' => array(), 'include' => array(),
 		'number' => '', 'fields' => 'all', 'slug' => '', 'parent' => '',
 		'hierarchical' => true, 'child_of' => 0, 'get' => '', 'name__like' => '',
 		'pad_counts' => false, 'offset' => '', 'search' => '');
@@ -693,14 +694,12 @@
 	if ( !empty($include) ) {
 		$exclude = '';
 		$exclude_tree = '';
-		$interms = preg_split('/[\s,]+/',$include);
-		if ( count($interms) ) {
-			foreach ( (array) $interms as $interm ) {
-				if (empty($inclusions))
-					$inclusions = ' AND ( t.term_id = ' . intval($interm) . ' ';
-				else
-					$inclusions .= ' OR t.term_id = ' . intval($interm) . ' ';
-			}
+		$interms = _parse_get_terms_arg($include);
+		foreach ( $interms as $interm ) {
+			if ( empty($inclusions) )
+				$inclusions = ' AND ( t.term_id = ' . intval($interm) . ' ';
+			else
+				$inclusions .= ' OR t.term_id = ' . intval($interm) . ' ';
 		}
 	}
 
@@ -709,29 +708,27 @@
 	$where .= $inclusions;
 
 	$exclusions = '';
-	if ( ! empty( $exclude_tree ) ) {
-		$excluded_trunks = preg_split('/[\s,]+/',$exclude_tree);
-		foreach( (array) $excluded_trunks as $extrunk ) {
+	if ( !empty( $exclude_tree ) ) {
+		$excluded_trunks = _parse_get_terms_arg($exclude_tree);
+		foreach ( $excluded_trunks as $extrunk ) {
 			$excluded_children = (array) get_terms($taxonomies[0], array('child_of' => intval($extrunk), 'fields' => 'ids'));
 			$excluded_children[] = $extrunk;
-			foreach( (array) $excluded_children as $exterm ) {
+			foreach( $excluded_children as $exterm ) {
 				if ( empty($exclusions) )
 					$exclusions = ' AND ( t.term_id <> ' . intval($exterm) . ' ';
 				else
 					$exclusions .= ' AND t.term_id <> ' . intval($exterm) . ' ';
-
 			}
 		}
 	}
+
 	if ( !empty($exclude) ) {
-		$exterms = preg_split('/[\s,]+/',$exclude);
-		if ( count($exterms) ) {
-			foreach ( (array) $exterms as $exterm ) {
-				if ( empty($exclusions) )
-					$exclusions = ' AND ( t.term_id <> ' . intval($exterm) . ' ';
-				else
-					$exclusions .= ' AND t.term_id <> ' . intval($exterm) . ' ';
-			}
+		$exterms = _parse_get_terms_arg($exclude);
+		foreach ( $exterms as $exterm ) {
+			if ( empty($exclusions) )
+				$exclusions = ' AND ( t.term_id <> ' . intval($exterm) . ' ';
+			else
+				$exclusions .= ' AND t.term_id <> ' . intval($exterm) . ' ';
 		}
 	}
 
@@ -808,7 +805,7 @@
 		foreach ( $terms as $k => $term ) {
 			if ( ! $term->count ) {
 				$children = _get_term_children($term->term_id, $terms, $taxonomies[0]);
-				if( is_array($children) )
+				if ( is_array($children) )
 					foreach ( $children as $child )
 						if ( $child->count )
 							continue 2;
@@ -841,6 +838,13 @@
 	return $terms;
 }
 
+function _parse_get_terms_arg($arg) {
+	if ( is_array($arg) )
+		return array_unique($arg);
+
+	return array_unique(preg_split('/[\s,]+/', $arg));
+}
+
 /**
  * Check if Term exists.
  *
