Index: wp-login.php
===================================================================
--- wp-login.php	(revision 17745)
+++ wp-login.php	(working copy)
@@ -323,7 +323,7 @@
 
 	$user_pass = wp_generate_password( 12, false);
 	$user_id = wp_create_user( $sanitized_user_login, $user_pass, $user_email );
-	if ( ! $user_id ) {
+	if ( ! $user_id || is_wp_error( $user_id ) ) {
 		$errors->add( 'registerfail', sprintf( __( '<strong>ERROR</strong>: Couldn&#8217;t register you... please contact the <a href="mailto:%s">webmaster</a> !' ), get_option( 'admin_email' ) ) );
 		return $errors;
 	}
