From 237b8eceeb5bf10fe3be7df810d8f0833182b85f Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 28 Jul 2016 13:51:47 +0200 Subject: [PATCH] fix Travis error for HHVM --- api/src/Cache/Memcached.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/api/src/Cache/Memcached.php b/api/src/Cache/Memcached.php index b891f12e14..51b43dc9b3 100644 --- a/api/src/Cache/Memcached.php +++ b/api/src/Cache/Memcached.php @@ -92,10 +92,14 @@ class Memcached extends Base implements ProviderMultiple \Memcached::OPT_LIBKETAMA_COMPATIBLE => true, // automatic failover and disabling of failed nodes \Memcached::OPT_SERVER_FAILURE_LIMIT => 2, - \Memcached::OPT_AUTO_EJECT_HOSTS => true, // setting a prefix for all keys \Memcached::OPT_PREFIX_KEY => $prefix, )); + // automatic disabling of failed nodes + if (@constant('Memcached::OPT_AUTO_EJECT_HOSTS')) + { + $this->memcache->setOption(\Memcached::OPT_AUTO_EJECT_HOSTS, true); + } // use igbinary, if available if (\Memcached::HAVE_IGBINARY) {