diff options
author | Joas Schilling <coding@schilljs.com> | 2017-01-05 11:57:18 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2017-01-05 11:57:18 +0100 |
commit | 57c65c3ec62982326a02322fea0322313e7908d0 (patch) | |
tree | 05ce5acf6a6db49d0416c123252a834081d37cbe /lib/private/Memcache | |
parent | bf043deba39af2b7586b3617aa1bc534df98b6ee (diff) | |
download | nextcloud-server-57c65c3ec62982326a02322fea0322313e7908d0.tar.gz nextcloud-server-57c65c3ec62982326a02322fea0322313e7908d0.zip |
Make sure old instances don't break
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/Memcache')
-rw-r--r-- | lib/private/Memcache/Factory.php | 6 |
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; } |