[wp-trac] [WordPress Trac] #16731: Unchecked array_merge() returns NULL in wp_update_user();
WordPress Trac
wp-trac at lists.automattic.com
Wed Mar 2 20:58:41 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 | Keywords: needs-patch needs-testing
--------------------------+---------------------------------------
I am running PHP version 5.3.3-1ubuntu9.3 and encountered a bug in a
simple plug-in I wrote that worked up to Wordpress v3.0.5 but not in 3.1.
It uses wp_update_user(), which is causing the issue. I traced the bug to
line 1563 of wp-includes/user.php:
$userdata = array_merge($user, $userdata);
If $user is NULL, then array_merge returns NULL, making $userdata useless
to other functions that follow like wp_insert_user().
--
Ticket URL: <http://core.trac.wordpress.org/ticket/16731>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list