summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Util.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/Util.pm')
-rw-r--r--Bugzilla/Util.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/Bugzilla/Util.pm b/Bugzilla/Util.pm
index 8e60944b0..ed1d4593c 100644
--- a/Bugzilla/Util.pm
+++ b/Bugzilla/Util.pm
@@ -321,8 +321,9 @@ sub do_ssl_redirect_if_required {
# Returns the real remote address of the client,
sub remote_ip {
- if (Bugzilla->usage_mode == USAGE_MODE_QUANTUM) {
- return Bugzilla->cgi->controller->tx->remote_address;
+ my $cgi = Bugzilla->cgi;
+ if ($cgi->can('controller')) {
+ return $cgi->controller->tx->remote_address;
}
else {
my $remote_ip = $ENV{'REMOTE_ADDR'} || '127.0.0.1';