Index: wp-includes/theme.php
===================================================================
--- wp-includes/theme.php	(revision 24974)
+++ wp-includes/theme.php	(working copy)
@@ -1527,7 +1527,7 @@
 	if ( 'custom-header-uploads' == $feature )
 		return current_theme_supports( 'custom-header', 'uploads' );
 
-	if ( !isset( $_wp_theme_features[$feature] ) )
+	if ( ! isset( $_wp_theme_features[$feature] ) )
 		return false;
 
 	// If no args passed then no extra checks need be performed
@@ -1541,17 +1541,17 @@
 			// post-thumbnails can be registered for only certain content/post types by passing
 			// an array of types to add_theme_support(). If no array was passed, then
 			// any type is accepted
-			if ( true === $_wp_theme_features[$feature] )  // Registered for all types
+			if ( true === $_wp_theme_features[ $feature ] )  // Registered for all types
 				return true;
 			$content_type = $args[0];
-			return in_array( $content_type, $_wp_theme_features[$feature][0] );
+			return in_array( $content_type, $_wp_theme_features[ $feature ][0] );
 			break;
 
 		case 'post-formats':
 			// specific post formats can be registered by passing an array of types to
 			// add_theme_support()
 			$post_format = $args[0];
-			return in_array( $post_format, $_wp_theme_features[$feature][0] );
+			return in_array( $post_format, $_wp_theme_features[ $feature ][0] );
 			break;
 
 		case 'custom-header':
@@ -1559,11 +1559,20 @@
 			// specific custom header and background capabilities can be registered by passing
 			// an array to add_theme_support()
 			$header_support = $args[0];
-			return ( isset( $_wp_theme_features[$feature][0][$header_support] ) && $_wp_theme_features[$feature][0][$header_support] );
+			return ( isset( $_wp_theme_features[ $feature ][0][ $header_support ] ) && $_wp_theme_features[ $feature ][0][ $header_support ] );
 			break;
+
+		case 'html5':
+			// just in case someone didn't pass an array to add_theme_support()
+			if ( ! is_array( $_wp_theme_features[ $feature ][0] ) )
+				return false;
+			// specific features can be output in html5 by passing an array to add_theme_support()
+			return in_array( $args[0], $_wp_theme_features[ $feature ][0] );
+			break;
+
 	}
 
-	return apply_filters('current_theme_supports-' . $feature, true, $args, $_wp_theme_features[$feature]);
+	return apply_filters( 'current_theme_supports-' . $feature, true, $args, $_wp_theme_features[ $feature ] );
 }
 
 /**
