diff --git a/memcache-lock.inc b/memcache-lock.inc index 7e3b3b64a588eb71a027193dda14b48759e776e8..6a26fcf70fb06449f55f7175f42ccd04f28d94ea 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;