X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=update.php;h=7b5f6778be7df92807978de0e88126016fa10e9f;hb=1f03462f2aced402f5a3d69da46ed0f930e8023c;hp=81e5be8d649875be0c76d4810003ba5cc909e72f;hpb=4208535c16f0e8196effe230cc34141551a7be18;p=friendica.git diff --git a/update.php b/update.php index 81e5be8d64..7b5f6778be 100644 --- a/update.php +++ b/update.php @@ -1,6 +1,6 @@ getCache()->getSource('system', 'distributed_cache_driver'); + $cache_driver_source = DI::config()->getCache()->getSource('system', 'cache_driver'); + + // In case the distributed cache driver is the default value, but the current cache driver isn't default, + // we assume that the distributed cache driver should be the same as the current cache driver + if ( + $distributed_cache_driver_source === \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC + && $cache_driver_source > \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC + ) { + DI::config()->set('system', 'distributed_cache_driver', DI::config()->get('system', 'cache_driver')); + } + + return Update::SUCCESS; +}