Skip to:
Content

bbPress.org


Ignore:
Timestamp:
10/27/2015 12:07:35 PM (4 years ago)
Author:
netweb
Message:

Users: Update $_SERVER['REMOTE_ADDR'] IP adress check to 127.0.0.1 in bbp_current_author_ip()

This changeset updates our unit tests and ensures compatability with WordPress test suite where in [WP34172] $_SERVER[ 'REMOTE_ADDR' ] is now initialised during the test bootstrap so individual tests need not.

Props thebrandonallen. See #2883.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/users/functions.php

    r5926 r5946  
    139139 * Get the poster IP address
    140140 *
    141  * @since bbPress (r3120)
     141 * @since 2.0.0 bbPress (r3120)
     142 * @since 2.6.0 bbPress (r5609) Added `empty()` check for unit tests
    142143 *
    143144 * @return string
     
    148149    $remote_address = ! empty( $_SERVER['REMOTE_ADDR'] )
    149150        ? $_SERVER['REMOTE_ADDR']
    150         : '0.0.0.0';
     151        : '127.0.0.1';
    151152
    152153    // Remove any unsavory bits
Note: See TracChangeset for help on using the changeset viewer.