summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordodozhang212018-03-15 10:36:57 (GMT)
committerJeremy Andrews2018-03-15 10:36:57 (GMT)
commit38c8b9b8ae2fe29204186f5cbc5960f9a9c5c1bd (patch)
tree84724fd669c4f7ac0d06a0eac09c7601bc141493
parent28c225009ef1e7fd179238678c29954ef26f3218 (diff)
Issue #2879600 by dodozhang21, osopolar: Call to a member function getStats() on booleanHEAD7.x-1.x
-rw-r--r--memcache-lock.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/memcache-lock.inc b/memcache-lock.inc
index 7e3b3b6..6a26fcf 100644
--- a/memcache-lock.inc
+++ b/memcache-lock.inc
@@ -13,10 +13,10 @@ require_once dirname(__FILE__) . '/dmemcache.inc';
// http://drupal.org/node/1225404
$lock_file = dirname(__FILE__) . '/memcache-lock-code.inc';
$mc = dmemcache_object('semaphore');
-// dmemcache_object always returns TRUE, we don't need these stats but it forces
+// dmemcache_object may return FALSE, we don't need these stats but it forces
// us to try and connect to memcache. If this fails, we can't store locks in
// memcache.
-if (!$mc->getStats()) {
+if (!$mc || !$mc->getStats()) {
$lock_file = DRUPAL_ROOT . '/includes/lock.inc';
}
require_once $lock_file;