]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix in locking cache check 27828/head
authorMichaIng <micha@dietpi.com>
Mon, 5 Jul 2021 21:11:13 +0000 (23:11 +0200)
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>
Tue, 6 Jul 2021 17:08:42 +0000 (17:08 +0000)
The intention obviously was to check whether $lockingCacheClass is defined, and existing class, and available. It was however checked whether the $distributedCacheClass is an existing class, which would have caused an exception already in the previous distributed cache check.

Signed-off-by: MichaIng <micha@dietpi.com>
lib/private/Memcache/Factory.php

index 0e1fc2f80c103afc10af30b06a314c4c5c886fa3..2c788027b230ec5a3efcc879a2945af1757c4d89 100644 (file)
@@ -95,7 +95,7 @@ class Factory implements ICacheFactory {
                                '{class}' => $distributedCacheClass, '{use}' => 'distributed'
                        ]), $missingCacheHint);
                }
-               if (!($lockingCacheClass && class_exists($distributedCacheClass) && $lockingCacheClass::isAvailable())) {
+               if (!($lockingCacheClass && class_exists($lockingCacheClass) && $lockingCacheClass::isAvailable())) {
                        // don't fallback since the fallback might not be suitable for storing lock
                        $lockingCacheClass = self::NULL_CACHE;
                }