Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a26b14d

Browse files
remicolletmichael-grunder
authored andcommitted
use zend_parse_parameters_none
1 parent ff331af commit a26b14d

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

redis.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -986,7 +986,7 @@ PHP_MINFO_FUNCTION(redis)
986986
Public constructor */
987987
PHP_METHOD(Redis, __construct)
988988
{
989-
if (zend_parse_parameters(ZEND_NUM_ARGS(), "") == FAILURE) {
989+
if (zend_parse_parameters_none() == FAILURE) {
990990
RETURN_FALSE;
991991
}
992992
}
@@ -996,7 +996,7 @@ PHP_METHOD(Redis, __construct)
996996
Public Destructor
997997
*/
998998
PHP_METHOD(Redis,__destruct) {
999-
if(zend_parse_parameters(ZEND_NUM_ARGS(), "") == FAILURE) {
999+
if (zend_parse_parameters_none() == FAILURE) {
10001000
RETURN_FALSE;
10011001
}
10021002

@@ -3488,8 +3488,9 @@ PHP_METHOD(Redis, getAuth) {
34883488
RedisSock *redis_sock;
34893489
zval zret;
34903490

3491-
if (zend_parse_parameters(ZEND_NUM_ARGS(), "") == FAILURE)
3491+
if (zend_parse_parameters_none() == FAILURE) {
34923492
RETURN_FALSE;
3493+
}
34933494

34943495
redis_sock = redis_sock_get_connected(INTERNAL_FUNCTION_PARAM_PASSTHRU);
34953496
if (redis_sock == NULL)

redis_commands.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3946,7 +3946,8 @@ int
39463946
redis_sentinel_cmd(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_sock,
39473947
char *kw, char **cmd, int *cmd_len, short *slot, void **ctx)
39483948
{
3949-
if (zend_parse_parameters(ZEND_NUM_ARGS(), "") == FAILURE) {
3949+
if (zend_parse_parameters_none() == FAILURE) {
3950+
39503951
return FAILURE;
39513952
}
39523953
*cmd_len = REDIS_CMD_SPPRINTF(cmd, "SENTINEL", "s", kw, strlen(kw));

0 commit comments

Comments
 (0)