[wp-trac] [WordPress Trac] #14290: register_new_user() can't handle WP_Error result from wp_create_user()

WordPress Trac wp-trac at lists.automattic.com
Thu Apr 28 14:48:26 UTC 2011


#14290: register_new_user() can't handle WP_Error result from wp_create_user()
--------------------------+-----------------------------
 Reporter:  coffee2code   |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Future Release
Component:  Users         |     Version:  3.0
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |
--------------------------+-----------------------------

Comment (by coffee2code):

 @mdawaffe is correct, though it looks to be pretty rare that a 0 would be
 returned by `wp_insert_user()`.  Updated patch has been attached
 (14290.2.diff), which refreshes original patch against latest trunk and
 accounts for `$user_id` potentially being 0 or a WP_Error.  But to be
 clear, `wp_insert_user()` is meant to return a WP_Error if there is an
 error and `register_new_user()` can't handle it without this patch.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/14290#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list