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:
parent
04429059b0
commit
5235448195
|
@ -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 ) ) {
|
||||
|
|
Loading…
Reference in New Issue