From 98a0d6aa4d1a6594dae3c641a8813e38993bad32 Mon Sep 17 00:00:00 2001 From: Arjan van den Bos Date: Thu, 30 Mar 2017 13:56:06 +0200 Subject: [PATCH] Removed coalesce operator in order to make it backwards compatible with PHP < 7.x --- src/CacheFactory.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/CacheFactory.php b/src/CacheFactory.php index 93dccb1..f7f1f2f 100644 --- a/src/CacheFactory.php +++ b/src/CacheFactory.php @@ -57,11 +57,10 @@ protected function createWithConfig(ContainerInterface $container, $configKey) break; case ChainCache::class: - $providers = array_map(function($provider) use ($container) { return $this->createWithConfig($container, $provider); }, - $config['providers'] ?? [] + is_array($config['providers']) ? $config['providers'] : [] ); $cache = new $config['class']($providers); break;