diff --git a/wp-includes/user.php b/wp-includes/user.php index 9c8d789768..f43f5e9a94 100644 --- a/wp-includes/user.php +++ b/wp-includes/user.php @@ -1794,6 +1794,10 @@ function wp_insert_user( $userdata ) { */ $data = apply_filters( 'wp_pre_insert_user_data', $data, $update, $update ? (int) $ID : null ); + if ( empty( $data ) || ! is_array( $data ) ) { + return new WP_Error( 'empty_data', __( 'Not enough data to create this user.' ) ); + } + if ( $update ) { if ( $user_email !== $old_user_data->user_email ) { $data['user_activation_key'] = ''; diff --git a/wp-includes/version.php b/wp-includes/version.php index 2cf3eca9a3..de6ec9c6bf 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.3-alpha-45857'; +$wp_version = '5.3-alpha-45858'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.