diff options
Diffstat (limited to 'phpBB/phpbb/cache/driver/memcache.php')
-rw-r--r-- | phpBB/phpbb/cache/driver/memcache.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/phpBB/phpbb/cache/driver/memcache.php b/phpBB/phpbb/cache/driver/memcache.php index 406ab11ddd..57f138f574 100644 --- a/phpBB/phpbb/cache/driver/memcache.php +++ b/phpBB/phpbb/cache/driver/memcache.php @@ -50,10 +50,10 @@ class memcache extends \phpbb\cache\driver\memory parent::__construct(); $this->memcache = new \Memcache; - foreach(explode(',', PHPBB_ACM_MEMCACHE) as $u) + foreach (explode(',', PHPBB_ACM_MEMCACHE) as $u) { - $parts = explode('/', $u); - $this->memcache->addServer(trim($parts[0]), trim($parts[1])); + preg_match('#(.*)/(\d+)#', $u, $parts); + $this->memcache->addServer(trim($parts[1]), (int) trim($parts[2])); } $this->flags = (PHPBB_ACM_MEMCACHE_COMPRESS) ? MEMCACHE_COMPRESSED : 0; } |