diff --git a/phpgwapi/inc/class.egw_cache.inc.php b/phpgwapi/inc/class.egw_cache.inc.php index d7e93622b7..bb2526e8ad 100644 --- a/phpgwapi/inc/class.egw_cache.inc.php +++ b/phpgwapi/inc/class.egw_cache.inc.php @@ -497,7 +497,7 @@ class egw_cache if ($level != self::TREE) $level = self::INSTANCE; - //if (!isset($providers[$level])) + if (!isset($providers[$level])) { $params = $GLOBALS['egw_info']['server']['cache_provider_'.strtolower($level)]; if (!isset($params) && $level == self::INSTANCE && isset(self::$default_provider)) diff --git a/phpgwapi/inc/class.egw_cache_memcache.inc.php b/phpgwapi/inc/class.egw_cache_memcache.inc.php index c4e5438a59..dcdfd92043 100644 --- a/phpgwapi/inc/class.egw_cache_memcache.inc.php +++ b/phpgwapi/inc/class.egw_cache_memcache.inc.php @@ -62,8 +62,9 @@ class egw_cache_memcache extends egw_cache_provider_check implements egw_cache_p $ok = false; foreach($params as $host_port) { - list($host,$port) = explode(':',$host_port); - if (!$port) $port = 11211; // default port + $parts = explode(':',$host_port); + $host = array_shift($parts); + $port = $parts ? array_shift($parts) : 11211; // default port $ok = $this->memcache->addServer($host,$port) || $ok; //error_log(__METHOD__."(".array2string($params).") memcache->addServer('$host',$port) = ".(int)$ok);