diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index 75eeb5f28d..f43b0b6c83 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -1298,13 +1298,12 @@ function do_settings_fields($page, $section) { function add_settings_error( $setting, $code, $message, $type = 'error' ) { global $wp_settings_errors; - $new_error = array( + $wp_settings_errors[] = array( 'setting' => $setting, - 'code' => $code, + 'code' => $code, 'message' => $message, - 'type' => $type + 'type' => $type ); - $wp_settings_errors[] = $new_error; } /**