Index: src/wp-includes/taxonomy.php
===================================================================
--- src/wp-includes/taxonomy.php	(revision 36334)
+++ src/wp-includes/taxonomy.php	(working copy)
@@ -1123,13 +1123,17 @@
  * @return array|int|WP_Error List of WP_Term instances and their children. Will return WP_Error, if any of $taxonomies
  *                            do not exist.
  */
-function get_terms( $taxonomies, $args = '' ) {
+function get_terms( $taxonomies = array(), $args = '' ) {
 	global $wpdb;
 	$empty_array = array();
 
 	$single_taxonomy = ! is_array( $taxonomies ) || 1 === count( $taxonomies );
 	if ( ! is_array( $taxonomies ) ) {
-		$taxonomies = array( $taxonomies );
+		if ( empty( $taxonomies ) ) {
+			$taxonomies = array();
+		} else {
+			$taxonomies = array( $taxonomies );
+		}
 	}
 
 	foreach ( $taxonomies as $taxonomy ) {
@@ -1286,7 +1290,10 @@
 		$order = 'ASC';
 	}
 
-	$where = "tt.taxonomy IN ('" . implode("', '", $taxonomies) . "')";
+	$where = "";
+	if ( 0 < count( $taxonomies ) ) {
+		$where = "tt.taxonomy IN ('" . implode("', '", $taxonomies) . "')";
+	}
 
 	$exclude = $args['exclude'];
 	$exclude_tree = $args['exclude_tree'];
@@ -1308,10 +1315,14 @@
 	if ( ! empty( $exclude_tree ) ) {
 		$exclude_tree = wp_parse_id_list( $exclude_tree );
 		$excluded_children = $exclude_tree;
+		$query_taxonomies = array();
+		if ( 0 < count( $taxonomies ) ) {
+			$query_taxonomies = $taxonomies[0];
+		}
 		foreach ( $exclude_tree as $extrunk ) {
 			$excluded_children = array_merge(
 				$excluded_children,
-				(array) get_terms( $taxonomies[0], array( 'child_of' => intval( $extrunk ), 'fields' => 'ids', 'hide_empty' => 0 ) )
+				(array) get_terms( $query_taxonomies, array( 'child_of' => intval( $extrunk ), 'fields' => 'ids', 'hide_empty' => 0 ) )
 			);
 		}
 		$exclusions = array_merge( $excluded_children, $exclusions );
@@ -1422,6 +1433,10 @@
 		$distinct .= "DISTINCT";
 	}
 
+	if ( 0 === strpos( $where, ' AND ' ) ) {
+		$where = substr( $where, 5 );
+	}
+
 	$selects = array();
 	switch ( $args['fields'] ) {
 		case 'all':
@@ -1490,8 +1505,12 @@
 	$order = isset( $clauses[ 'order' ] ) ? $clauses[ 'order' ] : '';
 	$limits = isset( $clauses[ 'limits' ] ) ? $clauses[ 'limits' ] : '';
 
-	$query = "SELECT $distinct $fields FROM $wpdb->terms AS t $join WHERE $where $orderby $order $limits";
+	if ( ! empty( $where ) ) {
+		$where = "WHERE " . $where;
+	}
 
+	$query = "SELECT $distinct $fields FROM $wpdb->terms AS t $join $where $orderby $order $limits";
+
 	// $args can be anything. Only use the args defined in defaults to compute the key.
 	$key = md5( serialize( wp_array_slice_assoc( $args, array_keys( $defaults ) ) ) . serialize( $taxonomies ) . $query );
 	$last_changed = wp_cache_get( 'last_changed', 'terms' );
