mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-20 09:36:15 +01:00
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:
parent
2752456493
commit
ec3d119861
@ -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
Block a user