mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 00:54:50 +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 ($level != self::TREE) $level = self::INSTANCE;
|
||||||
|
|
||||||
//if (!isset($providers[$level]))
|
if (!isset($providers[$level]))
|
||||||
{
|
{
|
||||||
$params = $GLOBALS['egw_info']['server']['cache_provider_'.strtolower($level)];
|
$params = $GLOBALS['egw_info']['server']['cache_provider_'.strtolower($level)];
|
||||||
if (!isset($params) && $level == self::INSTANCE && isset(self::$default_provider))
|
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;
|
$ok = false;
|
||||||
foreach($params as $host_port)
|
foreach($params as $host_port)
|
||||||
{
|
{
|
||||||
list($host,$port) = explode(':',$host_port);
|
$parts = explode(':',$host_port);
|
||||||
if (!$port) $port = 11211; // default port
|
$host = array_shift($parts);
|
||||||
|
$port = $parts ? array_shift($parts) : 11211; // default port
|
||||||
|
|
||||||
$ok = $this->memcache->addServer($host,$port) || $ok;
|
$ok = $this->memcache->addServer($host,$port) || $ok;
|
||||||
//error_log(__METHOD__."(".array2string($params).") memcache->addServer('$host',$port) = ".(int)$ok);
|
//error_log(__METHOD__."(".array2string($params).") memcache->addServer('$host',$port) = ".(int)$ok);
|
||||||
|
Loading…
Reference in New Issue
Block a user