8000 Fix to optional parameter (EX/NX) ordering for set command · jrtkcoder/phpredis@3b021ea · GitHub
[go: up one dir, main page]

Skip to content

Commit 3b021ea

Browse files
madsovesenmichael-grunder
authored andcommitted
Fix to optional parameter (EX/NX) ordering for set command
1 parent e3fb843 commit 3b021ea

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

redis_commands.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1273,9 +1273,9 @@ int redis_set_cmd(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_sock,
12731273
/* Now let's construct the command we want */
12741274
if(exp_type && set_type) {
12751275
/* SET <key> <value> NX|XX PX|EX <timeout> */
1276-
*cmd_len = redis_cmd_format_static(cmd, "SET", "ssssl", key, key_len,
1277-
val, val_len, set_type, 2, exp_type,
1278-
2, expire);
1276+
*cmd_len = redis_cmd_format_static(cmd, "SET", "sssls", key, key_len,
1277+
val, val_len, exp_type, 2, expire,
1278+
set_type, 2);
12791279
} else if(exp_type) {
12801280
/* SET <key> <value> PX|EX <timeout> */
12811281
*cmd_len = redis_cmd_format_static(cmd, "SET", "sssl", key, key_len,

0 commit comments

Comments
 (0)
0