Merge pull request #11881 from yashodha/CRM-21854
[civicrm-core.git] / CRM / Utils / Cache / Redis.php
index 5dddf91d538478f35b7894ac7e2b90d0788f90ae..d64a81667f6aa76e0e974fcbba15bf304317219b 100644 (file)
@@ -105,7 +105,9 @@ class CRM_Utils_Cache_Redis implements CRM_Utils_Cache_Interface {
       echo 'Could not connect to redisd server';
       CRM_Utils_System::civiExit();
     }
-    $this->_cache->auth(CIVICRM_DB_CACHE_PASSWORD);
+    if (CRM_Utils_Constant::value('CIVICRM_DB_CACHE_PASSWORD')) {
+      $this->_cache->auth(CIVICRM_DB_CACHE_PASSWORD);
+    }
   }
 
   /**