Commit 81b04e90 authored by webchick's avatar webchick
Browse files

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

parent f95f58cc
......@@ -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);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment