From e5df14d8bc921594472ed950d2deac25d4a1872c Mon Sep 17 00:00:00 2001 From: Stricted Date: Tue, 24 Dec 2013 22:13:47 +0100 Subject: [PATCH] add fallback to disk cache --- .../install/files/lib/system/cache/CacheHandler.class.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/system/cache/CacheHandler.class.php b/wcfsetup/install/files/lib/system/cache/CacheHandler.class.php index b52a3b7ad9..446d0a1c9e 100644 --- a/wcfsetup/install/files/lib/system/cache/CacheHandler.class.php +++ b/wcfsetup/install/files/lib/system/cache/CacheHandler.class.php @@ -30,7 +30,12 @@ class CacheHandler extends SingletonFactory { // init cache source object try { $className = 'wcf\system\cache\source\\'.ucfirst(CACHE_SOURCE_TYPE).'CacheSource'; - $this->cacheSource = new $className(); + if (class_exists($className)) + $this->cacheSource = new $className(); + else { + // fallback to disk cache + $this->cacheSource = new DiskCacheSource(); + } } catch (SystemException $e) { if (CACHE_SOURCE_TYPE != 'disk') { -- 2.20.1