From e480f6552f2ecb594d44d88ad5b4e5cb51caf52c Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Fri, 12 Aug 2016 20:22:05 +0000 Subject: Bug 1294571 - 015remote_ip.t throws a "uninitialized value" warning --- Bugzilla/Util.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Bugzilla') diff --git a/Bugzilla/Util.pm b/Bugzilla/Util.pm index dc41652f7..1a867c5ee 100644 --- a/Bugzilla/Util.pm +++ b/Bugzilla/Util.pm @@ -291,7 +291,7 @@ sub remote_ip { my @x_forwarded_for = split(/[\s,]+/, $ENV{HTTP_X_FORWARDED_FOR} // ''); return $remote_ip unless @x_forwarded_for; - return $x_forwarded_for[0] if $proxies[0] eq '*'; + return $x_forwarded_for[0] if (@proxies && $proxies[0] eq '*'); return $remote_ip if none { $_ eq $remote_ip } @proxies; foreach my $ip (reverse @x_forwarded_for) { -- cgit v1.2.3-24-g4f1b