summaryrefslogtreecommitdiffstats
path: root/memcache-lock.inc
diff options
context:
space:
mode:
Diffstat (limited to 'memcache-lock.inc')
-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;