From 81b04e90cf843751d1930ba72ec010650af9747b Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Sun, 12 Oct 2008 08:37:14 +0000 Subject: [PATCH] #320171 by Dave Reid: Fix exception in ip_address() test. --- includes/bootstrap.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc index 90f16f818f0..d07cd7f43c8 100644 --- a/includes/bootstrap.inc +++ b/includes/bootstrap.inc @@ -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); } }