summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Bugzilla/Memcached.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/Bugzilla/Memcached.pm b/Bugzilla/Memcached.pm
index 0ceed97c0..9868dfb42 100644
--- a/Bugzilla/Memcached.pm
+++ b/Bugzilla/Memcached.pm
@@ -206,6 +206,8 @@ sub should_rate_limit {
my $prefix = RATE_LIMIT_PREFIX . $name . ':';
my $memcached = $self->{memcached};
+ return 0 unless $memcached;
+
$tries //= 3;
for (0 .. $tries) {