[wp-trac] [WordPress Trac] #33977: set_transient('settings_errors', get_settings_errors(), 30); and multi user @ wp-admin/options.php

WordPress Trac noreply at wordpress.org
Wed Sep 23 13:37:54 UTC 2015


#33977: set_transient('settings_errors', get_settings_errors(), 30); and multi user
@ wp-admin/options.php
----------------------------+-----------------------------
 Reporter:  coldwinds       |      Owner:
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  General         |    Version:  4.3.1
 Severity:  normal          |   Keywords:
  Focuses:  administration  |
----------------------------+-----------------------------
 {{{
 #!div style="font-size: 80%"
 Code highlighting:
   {{{#!php
         /**
          * 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?

--
Ticket URL: <https://core.trac.wordpress.org/ticket/33977>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list