summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Memcached.pm
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2018-03-12 22:07:04 +0100
committerGitHub <noreply@github.com>2018-03-12 22:07:04 +0100
commit7430718ecad3f49801dfca1c9c93992435cfc732 (patch)
tree209af9b2236e57148d4b7fa7308be59e4efd46a7 /Bugzilla/Memcached.pm
parent9a8e6dd21f64b0242939c2abf789e274995b4ded (diff)
downloadbugzilla-7430718ecad3f49801dfca1c9c93992435cfc732.tar.gz
bugzilla-7430718ecad3f49801dfca1c9c93992435cfc732.tar.xz
no bug - make memcached optional
Diffstat (limited to 'Bugzilla/Memcached.pm')
-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) {