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