From c255e1fae82ffa4a80bda83cfadf86b765da0849 Mon Sep 17 00:00:00 2001 From: rxu Date: Sat, 17 Jun 2017 15:42:08 +0700 Subject: [ticket/15246] Allow use of Unix socket as memcache(d) host PHPBB3-15246 --- phpBB/phpbb/cache/driver/memcached.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'phpBB/phpbb/cache/driver/memcached.php') diff --git a/phpBB/phpbb/cache/driver/memcached.php b/phpBB/phpbb/cache/driver/memcached.php index 105e763af4..a7da22d7e8 100644 --- a/phpBB/phpbb/cache/driver/memcached.php +++ b/phpBB/phpbb/cache/driver/memcached.php @@ -67,8 +67,8 @@ class memcached extends \phpbb\cache\driver\memory foreach (explode(',', PHPBB_ACM_MEMCACHE) as $u) { - $parts = explode('/', $u); - $this->memcached->addServer(trim($parts[0]), trim($parts[1])); + preg_match('#(.*)/(\d+)#', $u, $parts); + $this->memcache->addServer(trim($parts[1]), (int) trim($parts[2])); } } -- cgit v1.2.1