diff options
author | Pavlo Yatsukhnenko <yatsukhnenko@users.noreply.github.com> | 2022-07-08 22:09:19 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-08 22:09:19 +0300 |
commit | 765d3cdf24508ff4a38a505abb5985b01a9d83e1 (patch) | |
tree | e3104eee1a8218d8d05e395081572e2498b074d4 | |
parent | 982bd13b9fa7b001598f3583e9c38e969b023cf7 (diff) | |
parent | c28ad7bbd6c824cf92c671bad8c442d697d499bb (diff) |
Merge pull request #2126 from phpredis/issue-2122
Issue #2122
-rw-r--r-- | library.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 |