#320171 by Dave Reid: Fix exception in ip_address() test.

merge-requests/26/head
Angie Byron 2008-10-12 08:37:14 +00:00
parent f95f58cc05
commit 81b04e90cf
1 changed files with 2 additions and 1 deletions

View File

@ -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);
}
}