summaryrefslogtreecommitdiffstats
path: root/lib/private/Memcache/Factory.php
diff options
context:
space:
mode:
authorSandro Lutz <sandro.lutz@temparus.ch>2017-02-07 00:12:45 +0100
committerSandro Lutz <sandro.lutz@temparus.ch>2017-02-07 00:15:30 +0100
commitfa1d607bfa951711a2c358f889db56962c179153 (patch)
tree904b6bd3b7f9d2ed133f64da22b3fb9bbfbf1842 /lib/private/Memcache/Factory.php
parentff3fa538e43bb38a5ff142b07216b9de79645c01 (diff)
parentb55f5af7eaab6f827989407fa7b8d51cbb877eab (diff)
downloadnextcloud-server-fa1d607bfa951711a2c358f889db56962c179153.tar.gz
nextcloud-server-fa1d607bfa951711a2c358f889db56962c179153.zip
Merge remote-tracking branch 'nextcloud/master'
Signed-off-by: Sandro Lutz <sandro.lutz@temparus.ch>
Diffstat (limited to 'lib/private/Memcache/Factory.php')
-rw-r--r--lib/private/Memcache/Factory.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/Memcache/Factory.php b/lib/private/Memcache/Factory.php
index f3841d31679..8e62e020faa 100644
--- a/lib/private/Memcache/Factory.php
+++ b/lib/private/Memcache/Factory.php
@@ -83,7 +83,7 @@ class Factory implements ICacheFactory {
$missingCacheMessage = 'Memcache {class} not available for {use} cache';
$missingCacheHint = 'Is the matching PHP module installed and enabled?';
- if (!$localCacheClass::isAvailable()) {
+ if (!class_exists($localCacheClass) || !$localCacheClass::isAvailable()) {
if (\OC::$CLI && !defined('PHPUNIT_RUN')) {
// CLI should not hard-fail on broken memcache
$this->logger->info($missingCacheMessage, [
@@ -98,7 +98,7 @@ class Factory implements ICacheFactory {
]), $missingCacheHint);
}
}
- if (!$distributedCacheClass::isAvailable()) {
+ if (!class_exists($distributedCacheClass) || !$distributedCacheClass::isAvailable()) {
if (\OC::$CLI && !defined('PHPUNIT_RUN')) {
// CLI should not hard-fail on broken memcache
$this->logger->info($missingCacheMessage, [
@@ -113,7 +113,7 @@ class Factory implements ICacheFactory {
]), $missingCacheHint);
}
}
- if (!($lockingCacheClass && $lockingCacheClass::isAvailable())) {
+ if (!($lockingCacheClass && class_exists($distributedCacheClass) && $lockingCacheClass::isAvailable())) {
// don't fallback since the fallback might not be suitable for storing lock
$lockingCacheClass = self::NULL_CACHE;
}