summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Lawrence <dkl@mozilla.com>2016-08-12 22:22:05 +0200
committerDavid Lawrence <dkl@mozilla.com>2016-08-12 22:22:05 +0200
commite480f6552f2ecb594d44d88ad5b4e5cb51caf52c (patch)
tree12c6f442db92d2d4de57234f144de192bd1c4a43
parent74cc533523bb6796c1f0c664d04c68566b126a15 (diff)
downloadbugzilla-e480f6552f2ecb594d44d88ad5b4e5cb51caf52c.tar.gz
bugzilla-e480f6552f2ecb594d44d88ad5b4e5cb51caf52c.tar.xz
Bug 1294571 - 015remote_ip.t throws a "uninitialized value" warning
-rw-r--r--Bugzilla/Util.pm2
1 files changed, 1 insertions, 1 deletions
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) {