diff --git a/wp-includes/class-wp-customize-manager.php b/wp-includes/class-wp-customize-manager.php index f96a220349..c701364149 100644 --- a/wp-includes/class-wp-customize-manager.php +++ b/wp-includes/class-wp-customize-manager.php @@ -928,8 +928,12 @@ final class WP_Customize_Manager { // Find the max widget number for this type. $widget_numbers = array_keys( $settings ); - $widget_numbers[] = 1; - $max_widget_numbers[ $id_base ] = call_user_func_array( 'max', $widget_numbers ); + if ( count( $widget_numbers ) > 0 ) { + $widget_numbers[] = 1; + $max_widget_numbers[ $id_base ] = call_user_func_array( 'max', $widget_numbers ); + } else { + $max_widget_numbers[ $id_base ] = 1; + } } $max_widget_numbers[ $id_base ] += 1; diff --git a/wp-includes/version.php b/wp-includes/version.php index 6b8d8530fe..5bae15fa8b 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.7-beta1-39099'; +$wp_version = '4.7-beta1-39100'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.