From 4b14fe059346b02da478eb0ac6a1ebb33912cd50 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 5 Jun 2014 18:29:14 +0000 Subject: [PATCH] Remove one-time variable from add_settings_error(). props niallkennedy. fixes #22228. Built from https://develop.svn.wordpress.org/trunk@28681 git-svn-id: http://core.svn.wordpress.org/trunk@28499 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/template.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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; } /**