Avoid overwriting $error global with an interim variable.

props MikeLittle.
fixes #28691.
Built from https://develop.svn.wordpress.org/trunk@28925


git-svn-id: http://core.svn.wordpress.org/trunk@28724 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2014-06-30 14:39:17 +00:00
parent 2752456493
commit ec3d119861
1 changed files with 4 additions and 4 deletions

View File

@ -172,12 +172,12 @@ function login_header( $title = 'Log In', $message = '', $wp_error = '' ) {
$errors = '';
$messages = '';
foreach ( $wp_error->get_error_codes() as $code ) {
$severity = $wp_error->get_error_data($code);
foreach ( $wp_error->get_error_messages($code) as $error ) {
$severity = $wp_error->get_error_data( $code );
foreach ( $wp_error->get_error_messages( $code ) as $error_message ) {
if ( 'message' == $severity )
$messages .= ' ' . $error . "<br />\n";
$messages .= ' ' . $error_message . "<br />\n";
else
$errors .= ' ' . $error . "<br />\n";
$errors .= ' ' . $error_message . "<br />\n";
}
}
if ( ! empty( $errors ) ) {