8000 Use immutable empty array in Redis::exec · phpredis/phpredis@60b5a88 · GitHub
[go: up one dir, main page]

Skip to content

Commit 60b5a88

Browse files
JakubOnderkamichael-grunder
authored andcommitted
Use immutable empty array in Redis::exec
1 parent 64da891 commit 60b5a88

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

redis.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2021,7 +2021,7 @@ PHP_METHOD(Redis, exec)
20212021
if (IS_PIPELINE(redis_sock)) {
20222022
if (smart_str_get_len(&redis_sock->pipeline_cmd) == 0) {
20232023
/* Empty array when no command was run. */
2024-
array_init(&z_ret);
2024+
ZVAL_EMPTY_ARRAY(&z_ret);
20252025
} else {
20262026
if (redis_sock_write(redis_sock, ZSTR_VAL(redis_sock->pipeline_cmd.s),
20272027
ZSTR_LEN(redis_sock->pipeline_cmd.s)) < 0) {

0 commit comments

Comments
 (0)
0