Opened 11 years ago
Last modified 7 years ago
#33977 new defect (bug)
set_transient('settings_errors', get_settings_errors(), 30); and multi user @ wp-admin/options.php
| Reported by: | coldwinds | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Options, Meta APIs | Version: | 4.3.1 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: | administration |
Description
Code highlighting:
/** * Handle settings errors and return to options page */ // If no settings errors were registered add a general 'updated' message. if ( !count( get_settings_errors() ) ) add_settings_error('general', 'settings_updated', __('Settings saved.'), 'updated'); set_transient('settings_errors', get_settings_errors(), 30); /** * Redirect back to the settings page that was submitted */ $goback = add_query_arg( 'settings-updated', 'true', wp_get_referer() ); wp_redirect( $goback ); exit;
I see the code above in wp-admin/options.php
since the key 'settings_errors' is not binding to a user, Is there a chance than one user's error message may be shown on another user's page?
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
I was not able to reproduce the error. The transient is set when it is submitted and deleted immediately after when it is displayed. While this is not ideal, I do not think it is broken.