Avoid overwriting $error global with an interim variable.

props MikeLittle.
fixes #28691.

git-svn-id: https://develop.svn.wordpress.org/trunk@28925 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2014-06-30 14:38:21 +00:00
parent 04429059b0
commit 5235448195
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 ) ) {