Index: wp-includes/category-template.php
===================================================================
--- wp-includes/category-template.php	(revision 6199)
+++ wp-includes/category-template.php	(working copy)
@@ -323,8 +323,18 @@
 	$return = wp_generate_tag_cloud( $tags, $args ); // Here's where those top tags get sorted according to $args
 	if ( is_wp_error( $return ) )
 		return false;
-	else 
-		echo apply_filters( 'wp_tag_cloud', $return, $args );
+	else
+	{
+		$return = apply_filters( 'wp_tag_cloud', $return, $args );
+		if ( 'array' == $args['format'] )
+		{
+			return $return;
+		}
+		else
+		{
+			echo $return;
+		}
+	}
 }
 
 // $tags = prefetched tag array ( get_tags() )
