diff --git a/src/wp-includes/theme.php b/src/wp-includes/theme.php
index 916c836f43..5fe2234321 100644
--- a/src/wp-includes/theme.php
+++ b/src/wp-includes/theme.php
@@ -2532,12 +2532,11 @@ function add_theme_support( $feature, ...$args ) {
 
 		case 'html5':
 			// You can't just pass 'html5', you need to pass an array of types.
-			if ( empty( $args[0] ) ) {
+			if ( ! isset( $args[0] ) || ! is_array( $args[0] ) || empty( $args[0] ) ) {
+				_doing_it_wrong( "add_theme_support( 'html5' )", __( 'You need to pass an array of types.' ), '3.6.1' );
+
 				// Build an array of types for back-compat.
 				$args = array( 0 => array( 'comment-list', 'comment-form', 'search-form' ) );
-			} elseif ( ! isset( $args[0] ) || ! is_array( $args[0] ) ) {
-				_doing_it_wrong( "add_theme_support( 'html5' )", __( 'You need to pass an array of types.' ), '3.6.1' );
-				return false;
 			}
 
 			// Calling 'html5' again merges, rather than overwrites.
