Skip to content

Commit

Permalink
Issue #1839 (#1854)
Browse files Browse the repository at this point in the history
  • Loading branch information
yatsukhnenko committed Sep 28, 2020
1 parent 950e8de commit 81c502a
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions redis_sentinel.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,12 @@ PHP_METHOD(RedisSentinel, __construct)
zend_long port = 26379, retry_interval = 0;
redis_sentinel_object *obj;
zend_string *host;
zval *zv = NULL;
zval *auth = NULL, *zv = NULL;

if (zend_parse_parameters(ZEND_NUM_ARGS(), "S|ldz!ld",
if (zend_parse_parameters(ZEND_NUM_ARGS(), "S|ldz!ldz",
&host, &port, &timeout, &zv,
&retry_interval, &read_timeout) == FAILURE) {
&retry_interval, &read_timeout,
&auth) == FAILURE) {
RETURN_FALSE;
}

Expand Down Expand Up @@ -96,6 +97,9 @@ PHP_METHOD(RedisSentinel, __construct)
obj = PHPREDIS_ZVAL_GET_OBJECT(redis_sentinel_object, getThis());
obj->sock = redis_sock_create(ZSTR_VAL(host), ZSTR_LEN(host), port,
timeout, read_timeout, persistent, persistent_id, retry_interval);
if (auth) {
redis_sock_set_auth_zval(obj->sock, auth);
}
}

PHP_METHOD(RedisSentinel, ckquorum)
Expand Down

0 comments on commit 81c502a

Please sign in to comment.