Update Composer packages
This commit is contained in:
parent
0320235f6c
commit
a8b68fb61b
378 changed files with 28466 additions and 28852 deletions
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace Kirby\Cms;
|
||||
|
||||
use Kirby\Cache\Cache;
|
||||
use Kirby\Cache\NullCache;
|
||||
use Kirby\Exception\InvalidArgumentException;
|
||||
|
||||
|
@ -54,7 +55,7 @@ trait AppCaches
|
|||
$cache = new $className($options);
|
||||
|
||||
// check if it is a usable cache object
|
||||
if (is_a($cache, 'Kirby\Cache\Cache') !== true) {
|
||||
if ($cache instanceof Cache === false) {
|
||||
throw new InvalidArgumentException([
|
||||
'key' => 'app.invalid.cacheType',
|
||||
'data' => ['type' => $type]
|
||||
|
@ -72,7 +73,8 @@ trait AppCaches
|
|||
*/
|
||||
protected function cacheOptions(string $key): array
|
||||
{
|
||||
$options = $this->option($this->cacheOptionsKey($key), false);
|
||||
$options = $this->option($this->cacheOptionsKey($key), null);
|
||||
$options ??= $this->core()->caches()[$key] ?? false;
|
||||
|
||||
if ($options === false) {
|
||||
return [
|
||||
|
@ -94,9 +96,9 @@ trait AppCaches
|
|||
|
||||
if ($options === true) {
|
||||
return $defaults;
|
||||
} else {
|
||||
return array_merge($defaults, $options);
|
||||
}
|
||||
|
||||
return array_merge($defaults, $options);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue