#320171 by Dave Reid: Fix exception in ip_address() test.
parent
f95f58cc05
commit
81b04e90cf
|
@ -1236,7 +1236,8 @@ function ip_address($reset = FALSE) {
|
|||
if (!empty($reverse_proxy_addresses) && in_array($ip_address, $reverse_proxy_addresses, TRUE)) {
|
||||
// If there are several arguments, we need to check the most
|
||||
// recently added one, i.e. the last one.
|
||||
$ip_address = array_pop(explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']));
|
||||
$ip_address_parts = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']);
|
||||
$ip_address = array_pop($ip_address_parts);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue