Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpredis/phpredis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavlo Yatsukhnenko <yatsukhnenko@users.noreply.github.com>2022-07-08 22:09:19 +0300
committerGitHub <noreply@github.com>2022-07-08 22:09:19 +0300
commit765d3cdf24508ff4a38a505abb5985b01a9d83e1 (patch)
treee3104eee1a8218d8d05e395081572e2498b074d4
parent982bd13b9fa7b001598f3583e9c38e969b023cf7 (diff)
parentc28ad7bbd6c824cf92c671bad8c442d697d499bb (diff)
Merge pull request #2126 from phpredis/issue-2122
Issue #2122
-rw-r--r--library.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/library.c b/library.c
index 73925a37..cbb8e1b2 100644
--- a/library.c
+++ b/library.c
@@ -2340,7 +2340,7 @@ PHP_REDIS_API int redis_sock_connect(RedisSock *redis_sock)
#ifdef HAVE_IPV6
/* If we've got IPv6 and find a colon in our address, convert to proper
* IPv6 [host]:port format */
- if (strchr(address, ':') != NULL) {
+ if (strchr(address, ':') != NULL && strchr(address, '[') == NULL) {
fmtstr = "%s://[%s]:%d";
}
#endif