Don't override an existing WP_Error object in wp_authenticate_username_password().

props willnorris.
fixes #19714.



git-svn-id: http://core.svn.wordpress.org/trunk@24850 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2013-07-29 03:43:22 +00:00
parent 23bc457498
commit 34ce599935
1 changed files with 3 additions and 0 deletions

View File

@ -73,6 +73,9 @@ function wp_authenticate_username_password($user, $username, $password) {
if ( is_a($user, 'WP_User') ) { return $user; }
if ( empty($username) || empty($password) ) {
if ( is_wp_error( $user ) )
return $user;
$error = new WP_Error();
if ( empty($username) )