From 68b9ef8520ddd4e4312575a8dd8a0ade80df17fe Mon Sep 17 00:00:00 2001 From: Arthur Hall Date: Sun, 6 Dec 2015 12:54:33 +0100 Subject: [PATCH] Checking host before addServer --- DependencyInjection/LswMemcacheExtension.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/DependencyInjection/LswMemcacheExtension.php b/DependencyInjection/LswMemcacheExtension.php index ec0f02a..0aa142f 100644 --- a/DependencyInjection/LswMemcacheExtension.php +++ b/DependencyInjection/LswMemcacheExtension.php @@ -199,7 +199,9 @@ private function newMemcacheClient($name, array $config, ContainerBuilder $conta $s['timeout'], $s['retry_interval'] ); - $memcache->addMethodCall('addServer', $server); + if ($s['host']) { + $memcache->addMethodCall('addServer', $server); + } } $memcache->addArgument($config['options']);