#33877 closed enhancement (fixed)
Initialise $_SERVER[ 'REMOTE_ADDR' ] in the unit test bootstrap
| Reported by: | johnbillion | Owned by: | johnbillion |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.4 |
| Component: | Build/Test Tools | Version: | |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
In 34172: