[wp-trac] [WordPress Trac] #23005: wp_update_user breaks if ID not set

WordPress Trac noreply at wordpress.org
Wed Dec 19 15:18:43 UTC 2012


#23005: wp_update_user breaks if ID not set
-----------------------------+--------------------------
 Reporter:  actionnerd       |       Type:  defect (bug)
   Status:  new              |   Priority:  normal
Milestone:  Awaiting Review  |  Component:  Users
  Version:  3.5              |   Severity:  normal
 Keywords:                   |
-----------------------------+--------------------------
 Passing an array of userdata to wp_update_user (first_name, last_name,
 user_email, user_login).

 If ID is not in the array, then a PHP Fatal Error is triggered:
 [19-Dec-2012 15:03:16 UTC] PHP Fatal error:  Call to a member function
 to_array() on a non-object in [..]/web/content/wp-includes/user.php on
 line 1456

 The codex for wp_update_user
 (http://codex.wordpress.org/Function_Reference/wp_update_user) does state
 "If $userdata does not contain an 'ID' key, then a new user will be
 created and the new user's ID will be returned.", which makes me think
 this might be a new bug.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/23005>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list