[wp-trac] [WordPress Trac] #16731: Unchecked array_merge() returns NULL in wp_update_user();

WordPress Trac wp-trac at lists.automattic.com
Sat Mar 5 15:11:34 UTC 2011


#16731: Unchecked array_merge() returns NULL in wp_update_user();
-------------------------------------------+------------------------------
 Reporter:  milan.chotai                   |       Owner:
     Type:  defect (bug)                   |      Status:  new
 Priority:  normal                         |   Milestone:  Awaiting Review
Component:  Users                          |     Version:  3.1
 Severity:  normal                         |  Resolution:
 Keywords:  2nd-opinion reporter-feedback  |
-------------------------------------------+------------------------------
Changes (by nacin):

 * keywords:  needs-patch needs-testing => 2nd-opinion reporter-feedback


Comment:

 I don't see how $user would be null. wp_update_user() should only be fired
 on existing users.

 If `$userdata['ID']` isn't set or if `get_userdata()` on that ID fails,
 then ideally wp_update_user() should fail.

 Also, get_userdata() fails with false, not null (but the same symptoms
 would occur with the array_merge()).

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


More information about the wp-trac mailing list