[wp-trac] [WordPress Trac] #44965: WordPress Core strips $_GET['error'] occasionally

WordPress Trac noreply at wordpress.org
Tue Mar 19 02:53:58 UTC 2019


#44965: WordPress Core strips $_GET['error'] occasionally
----------------------------------------+-----------------------------
 Reporter:  javorszky                   |       Owner:  SergeyBiryukov
     Type:  defect (bug)                |      Status:  accepted
 Priority:  normal                      |   Milestone:  5.2
Component:  Query                       |     Version:
 Severity:  normal                      |  Resolution:
 Keywords:  has-patch needs-unit-tests  |     Focuses:
----------------------------------------+-----------------------------

Comment (by gabrielchung1128):

 When I am constructing a test case for this issue, I have found that when
 the test case is run, the global scope is removed. It means that $_GET
 will be cleared. It makes it difficult to create a test case for it.
 Should we have a configuration variable to bypass cleaning the global
 scope? Thanks.

 Here is the line of code of removing the global scope:
 [https://github.com/WordPress/wordpress-
 develop/blob/c62eab00a79d76ef94f01ee841cfa7708ad9811c/tests/phpunit/includes
 /abstract-testcase.php#L129]

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


More information about the wp-trac mailing list