#33877 closed enhancement (fixed)
Initialise $_SERVER[ 'REMOTE_ADDR' ] in the unit test bootstrap
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 4.4 | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Build/Test Tools | Keywords: | has-patch |
| Focuses: | Cc: |
Description
In various tests, $_SERVER[ 'REMOTE_ADDR' ] is given a value in order to prevent PHP notices being triggered by functions such as wpmu_log_new_registrations() which use the superglobal without validating it first.
$_SERVER[ 'REMOTE_ADDR' ] should be initialised with a dummy value in the unit test bootstrap so individual tests don't need to.
I had this patch applied while running the tests for #25162, which is why the failures were missed.
Attachments (1)
Change History (5)
Note: See
TracTickets for help on using
tickets.
In 34172: