We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 950e8de commit 81c502aCopy full SHA for 81c502a
redis_sentinel.c
@@ -55,11 +55,12 @@ PHP_METHOD(RedisSentinel, __construct)
55
zend_long port = 26379, retry_interval = 0;
56
redis_sentinel_object *obj;
57
zend_string *host;
58
- zval *zv = NULL;
+ zval *auth = NULL, *zv = NULL;
59
60
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "S|ldz!ld",
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "S|ldz!ldz",
61
&host, &port, &timeout, &zv,
62
- &retry_interval, &read_timeout) == FAILURE) {
+ &retry_interval, &read_timeout,
63
+ &auth) == FAILURE) {
64
RETURN_FALSE;
65
}
66
@@ -96,6 +97,9 @@ PHP_METHOD(RedisSentinel, __construct)
96
97
obj = PHPREDIS_ZVAL_GET_OBJECT(redis_sentinel_object, getThis());
98
obj->sock = redis_sock_create(ZSTR_VAL(host), ZSTR_LEN(host), port,
99
timeout, read_timeout, persistent, persistent_id, retry_interval);
100
+ if (auth) {
101
+ redis_sock_set_auth_zval(obj->sock, auth);
102
+ }
103
104
105
PHP_METHOD(RedisSentinel, ckquorum)
0 commit comments