aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2017-06-25 10:32:35 +0200
committerMarc Alexander <admin@m-a-styles.de>2017-06-25 10:32:35 +0200
commitea8334b693220c202a811b6c8ee1786c222d160e (patch)
treeef7f858a80493b755acc9a56b8f8052a7c44cf56 /phpBB
parente50e5dbcae18de4deedec1a78afdfeec26e7b47a (diff)
parentc255e1fae82ffa4a80bda83cfadf86b765da0849 (diff)
downloadforums-ea8334b693220c202a811b6c8ee1786c222d160e.tar
forums-ea8334b693220c202a811b6c8ee1786c222d160e.tar.gz
forums-ea8334b693220c202a811b6c8ee1786c222d160e.tar.bz2
forums-ea8334b693220c202a811b6c8ee1786c222d160e.tar.xz
forums-ea8334b693220c202a811b6c8ee1786c222d160e.zip
Merge pull request #4850 from rxu/ticket/15246
[ticket/15246] Allow use of Unix socket as memcache(d) host
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/phpbb/cache/driver/memcache.php4
-rw-r--r--phpBB/phpbb/cache/driver/memcached.php4
2 files changed, 4 insertions, 4 deletions
diff --git a/phpBB/phpbb/cache/driver/memcache.php b/phpBB/phpbb/cache/driver/memcache.php
index caa82fb0b1..57f138f574 100644
--- a/phpBB/phpbb/cache/driver/memcache.php
+++ b/phpBB/phpbb/cache/driver/memcache.php
@@ -52,8 +52,8 @@ class memcache extends \phpbb\cache\driver\memory
$this->memcache = new \Memcache;
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;
}
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]));
}
}