mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 00:13:35 +01:00
fix commented out reuse of already instanciated provider, and fix PHP Notice in memcache provider
This commit is contained in:
parent
598afb0dae
commit
ff036416bf
@ -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))
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user