Merge pull request #17345 from eileenmcnaughton/ev_batch
[civicrm-core.git] / CRM / Utils / Cache / Redis.php
index b5cb655e4214474933bcc7f4b901427c675daa6e..b9db031f07708843622994642cb21f86be5c76f8 100644 (file)
@@ -60,8 +60,8 @@ class CRM_Utils_Cache_Redis implements CRM_Utils_Cache_Interface {
    * @return Redis
    */
   public static function connect($config) {
-    $host = isset($config['host']) ? $config['host'] : self::DEFAULT_HOST;
-    $port = isset($config['port']) ? $config['port'] : self::DEFAULT_PORT;
+    $host = $config['host'] ?? self::DEFAULT_HOST;
+    $port = $config['port'] ?? self::DEFAULT_PORT;
     // Ugh.
     $pass = CRM_Utils_Constant::value('CIVICRM_DB_CACHE_PASSWORD');
     $id = implode(':', ['connect', $host, $port /* $pass is constant */]);