[wp-trac] [WordPress Trac] #16731: Unchecked array_merge() returns NULL in wp_update_user();
WordPress Trac
wp-trac at lists.automattic.com
Sat Mar 12 14:00:19 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 |
-------------------------------------------+------------------------------
Comment (by adambackstrom):
Replying to [comment:1 nacin]:
> I don't see how $user would be null. wp_update_user() should only be
fired on existing users.
From the function docblock: "If $userdata does not contain an 'ID' key,
then a new user will be created and the new user's ID will be returned."
So, we should be able to call wp_update_user() regardless of whether we
mean "update" or "create." Just like milan.chotai, I have code that does
this for convenience.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/16731#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list