diff options
author | Remi Collet <remi@remirepo.net> | 2020-09-16 11:20:17 +0300 |
---|---|---|
committer | Pavlo Yatsukhnenko <yatsukhnenko@gmail.com> | 2021-08-26 09:53:07 +0300 |
commit | 7e621b99da443938ed97d8bba94e3b06a79ea231 (patch) | |
tree | 15f5031be6a9b35858cfe9daee51c224c79c97c9 | |
parent | 10feb234303ea36c203d80bc2d606685456d26e1 (diff) |
use zend_parse_parameters_none
-rw-r--r-- | redis.c | 7 | ||||
-rw-r--r-- | redis_commands.c | 3 |
2 files changed, 6 insertions, 4 deletions
@@ -993,7 +993,7 @@ PHP_MINFO_FUNCTION(redis) Public constructor */ PHP_METHOD(Redis, __construct) { - if (zend_parse_parameters(ZEND_NUM_ARGS(), "") == FAILURE) { + if (zend_parse_parameters_none() == FAILURE) { RETURN_FALSE; } } @@ -1003,7 +1003,7 @@ PHP_METHOD(Redis, __construct) Public Destructor */ PHP_METHOD(Redis,__destruct) { - if(zend_parse_parameters(ZEND_NUM_ARGS(), "") == FAILURE) { + if (zend_parse_parameters_none() == FAILURE) { RETURN_FALSE; } @@ -3532,8 +3532,9 @@ PHP_METHOD(Redis, getAuth) { RedisSock *redis_sock; zval zret; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "") == FAILURE) + if (zend_parse_parameters_none() == FAILURE) { RETURN_FALSE; + } redis_sock = redis_sock_get_connected(INTERNAL_FUNCTION_PARAM_PASSTHRU); if (redis_sock == NULL) diff --git a/redis_commands.c b/redis_commands.c index 286d5820..4e0647d4 100644 --- a/redis_commands.c +++ b/redis_commands.c @@ -4246,7 +4246,8 @@ int redis_sentinel_cmd(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_sock, char *kw, char **cmd, int *cmd_len, short *slot, void **ctx) { - if (zend_parse_parameters(ZEND_NUM_ARGS(), "") == FAILURE) { + if (zend_parse_parameters_none() == FAILURE) { + return FAILURE; } *cmd_len = REDIS_CMD_SPPRINTF(cmd, "SENTINEL", "s", kw, strlen(kw)); |