mirror of
https://github.com/phpredis/phpredis.git
synced 2026-06-19 07:35:31 +00:00
If no command is issued in multi mode, return immutable empty array
This commit is contained in:
committed by
Michael Grunder
parent
426de2bb71
commit
5156e03202
@@ -1974,6 +1974,12 @@ redis_sock_read_multibulk_multi_reply(INTERNAL_FUNCTION_PARAMETERS,
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
// No command issued, return empty immutable array
|
||||
if (redis_sock->head == NULL) {
|
||||
ZVAL_EMPTY_ARRAY(z_tab);
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
array_init(z_tab);
|
||||
|
||||
return redis_sock_read_multibulk_multi_reply_loop(INTERNAL_FUNCTION_PARAM_PASSTHRU,
|
||||
|
||||
Reference in New Issue
Block a user