From 6ccf7b72e2eccc0eb996d6f3890c0358eaa1e845 Mon Sep 17 00:00:00 2001 From: Shish Date: Wed, 2 Oct 2019 00:39:45 +0100 Subject: [PATCH] int for port numbers --- core/cacheengine.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/cacheengine.php b/core/cacheengine.php index cf471d54..7d78abff 100644 --- a/core/cacheengine.php +++ b/core/cacheengine.php @@ -32,7 +32,7 @@ class MemcachedCache implements CacheEngine #$this->memcache->setOption(Memcached::OPT_COMPRESSION, False); #$this->memcache->setOption(Memcached::OPT_SERIALIZER, Memcached::SERIALIZER_PHP); #$this->memcache->setOption(Memcached::OPT_PREFIX_KEY, phpversion()); - $this->memcache->addServer($hp[0], $hp[1]); + $this->memcache->addServer($hp[0], (int)$hp[1]); } public function get(string $key) @@ -106,7 +106,7 @@ class RedisCache implements CacheEngine { $this->redis = new Redis(); $hp = explode(":", $args); - $this->redis->pconnect($hp[0], $hp[1]); + $this->redis->pconnect($hp[0], (int)$hp[1]); $this->redis->setOption(Redis::OPT_SERIALIZER, Redis::SERIALIZER_PHP); $this->redis->setOption(Redis::OPT_PREFIX, 'shm:'); }