Opened 10 years ago
Closed 10 years ago
#2750 closed defect (bug) (fixed)
Unit tests output notices from bbp_current_author_ip()
Reported by: | johnjamesjacoby | Owned by: | johnjamesjacoby |
---|---|---|---|
Milestone: | 2.6 | Priority: | normal |
Severity: | normal | Version: | 2.1 |
Component: | General | Keywords: | |
Cc: |
Description
Starting to setup PHPUnit, I'm getting notices from bbp_current_author_ip()
because of our direct and unchecked use of $_SERVER['REMOTE_ADDR']
PHP Notice: Undefined index: REMOTE_ADDR in /includes/users/functions.php on line 146
Change History (2)
Note: See
TracTickets for help on using
tickets.
This can safely be fixed with an
empty()
check to start. In the event there's noREMOTE_ADDR
I propose we force the IP address to '0.0.0.0' so at least there's an indication something strange occurred.