Added support for braindead IPv6 notation
authorAlexander Ebert <ebert@woltlab.com>
Thu, 14 Feb 2013 20:49:37 +0000 (21:49 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 14 Feb 2013 20:49:37 +0000 (21:49 +0100)
wcfsetup/install/files/lib/system/cache/source/MemcachedCacheSource.class.php

index 6e66505ff13de7668010c94a2386db337b1a62c1..540c9b04dd955bf1dbfbfe674806b7ae6bd09996 100644 (file)
@@ -42,7 +42,7 @@ class MemcachedCacheSource implements ICacheSource {
                $tmp = explode("\n", StringUtil::unifyNewlines(CACHE_SOURCE_MEMCACHED_HOST));
                $servers = array();
                $defaultWeight = floor(100 / count($tmp));
-               $regex = new Regex('^\[([a-z0-9\:]+)\](?::([0-9]{1,5}))?(?::([0-9]{1,3}))?$', Regex::CASE_INSENSITIVE);
+               $regex = new Regex('^\[([a-z0-9\:\.]+)\](?::([0-9]{1,5}))?(?::([0-9]{1,3}))?$', Regex::CASE_INSENSITIVE);
                
                foreach ($tmp as $server) {
                        $server = StringUtil::trim($server);