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:
Diffstat (limited to 'redis.c')
-rw-r--r--redis.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/redis.c b/redis.c
index 3a0b6973..fbc2fee2 100644
--- a/redis.c
+++ b/redis.c
@@ -978,6 +978,10 @@ redis_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
port = 6379;
}
+ if (port < 0) {
+ port = 0;
+ }
+
redis = PHPREDIS_GET_OBJECT(redis_object, object);
/* if there is a redis sock already we have to remove it */
if (redis->sock) {