summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Bugzilla/Util.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/Bugzilla/Util.pm b/Bugzilla/Util.pm
index 19444082f..2703a542e 100644
--- a/Bugzilla/Util.pm
+++ b/Bugzilla/Util.pm
@@ -312,7 +312,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) {