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

props willnorris.
fixes #19714.



git-svn-id: https://develop.svn.wordpress.org/trunk@24850 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2013-07-29 03:43:22 +00:00
parent 4da2cb6d51
commit 86661dc523

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) )