diff options
-rw-r--r-- | Bugzilla.pm | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Bugzilla.pm b/Bugzilla.pm index 8928ff8b0..621222e8a 100644 --- a/Bugzilla.pm +++ b/Bugzilla.pm @@ -485,8 +485,14 @@ sub usage_mode { } $class->request_cache->{usage_mode} = $newval; } - return $class->request_cache->{usage_mode} - || (i_am_cgi()? USAGE_MODE_BROWSER : USAGE_MODE_CMDLINE); + + # XXX - Once we require Perl 5.10.1, this test can be replaced by //. + if (exists $class->request_cache->{usage_mode}) { + return $class->request_cache->{usage_mode}; + } + else { + return (i_am_cgi()? USAGE_MODE_BROWSER : USAGE_MODE_CMDLINE); + } } sub installation_mode { |