fixes missing host/port for memcached caching config
authorPhilipp Schüle <p.schuele@metaways.de>
Wed, 5 Aug 2015 12:15:30 +0000 (14:15 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Wed, 5 Aug 2015 17:48:44 +0000 (19:48 +0200)
Change-Id: If2900e10574dc9d7efd60c5e65482e3a04ce6a23
Reviewed-on: http://gerrit.tine20.com/customers/2090
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Tinebase/Core.php

index a9ee351..8eb31fe 100644 (file)
@@ -723,8 +723,10 @@ class Tinebase_Core
                         break;
                         
                     case 'Memcached':
-                        $host = $config->caching->host ? $config->caching->host : ($config->caching->memcached->host ? $config->caching->memcached->host : 'localhost');
-                        $port = $config->caching->port ? $config->caching->port : ($config->caching->memcached->port ? $config->caching->memcached->port : 11211);
+                        $host = $config->caching->host ? $config->caching->host : (isset($config->caching->memcached->host)
+                            ? $config->caching->memcached->host : 'localhost');
+                        $port = $config->caching->port ? $config->caching->port : (isset($config->caching->memcached->port)
+                            ? $config->caching->memcached->port : 11211);
                         $backendOptions = array(
                             'servers' => array(
                                 'host' => $host,