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

Skip to content

Commit 3a622a0

Browse files
Also set error for hGetAll and lower error len by 1
1 parent 7f42d62 commit 3a622a0

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

library.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1211,6 +1211,9 @@ redis_mbulk_reply_zipped(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_sock,
12111211
} else {
12121212
add_next_index_bool(z_tab, 0);
12131213
}
1214+
if (*inbuf == TYPE_ERR) {
1215+
redis_sock_set_err(redis_sock, inbuf + 1, len - 1);
1216+
}
12141217
return -1;
12151218
}
12161219
numElems = atoi(inbuf+1);
@@ -2122,7 +2125,7 @@ PHP_REDIS_API int redis_mbulk_reply_assoc(INTERNAL_FUNCTION_PARAMETERS, RedisSoc
21222125
add_next_index_bool(z_tab, 0);
21232126
}
21242127
if (*inbuf == TYPE_ERR) {
2125-
redis_sock_set_err(redis_sock, inbuf + 1, len);
2128+
redis_sock_set_err(redis_sock, inbuf + 1, len - 1);
21262129
}
21272130
goto failure;
21282131
}

0 commit comments

Comments
 (0)