[wp-trac] [WordPress Trac] #18088: Network Admin Email setting in wp-admin/network/settings.php fails silently

WordPress Trac noreply at wordpress.org
Fri Sep 30 07:35:26 UTC 2016


#18088: Network Admin Email setting in wp-admin/network/settings.php fails silently
-------------------------------------+-------------------------------------
 Reporter:  kawauso                  |       Owner:  jeremyfelt
     Type:  defect (bug)             |      Status:  reviewing
 Priority:  normal                   |   Milestone:  4.7
Component:  Networks and Sites       |     Version:  3.2
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch has-unit-      |     Focuses:  administration,
  tests                              |  multisite
-------------------------------------+-------------------------------------

Comment (by flixos90):

 Replying to [comment:29 jeremyfelt]:
 > In tests like these, make sure that the globals modified in the test are
 set back to their original value before the assertion is run. If the
 assertion was to fail, the remainder of the function would not run and the
 global would be stuck as is. This could cause false positives or negatives
 in the tests that run after the failed assertion.

 Good point, I didn't think about this! In [attachment:18088.6.diff] I made
 sure that the globals and GET params get reset before running each
 assertion. I also split the one test method so that each test contains one
 assertion and used more descriptive method names.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/18088#comment:30>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list