Skip to content

Commit 2552b29

Browse files
Merge branch 'hotfix/mget_skip_empty'
2 parents 43b35a4 + 9eaf147 commit 2552b29

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

redis_array.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -876,7 +876,10 @@ PHP_METHOD(RedisArray, mget)
876876

877877
/* calls */
878878
for(n = 0; n < ra->count; ++n) { /* for each node */
879-
/* copy args for MGET call on node. */
879+
/* We don't even need to make a call to this node if no keys go there */
880+
if(!argc_each[n]) continue;
881+
882+
/* copy args for MGET call on node. */
880883
MAKE_STD_ZVAL(z_argarray);
881884
array_init(z_argarray);
882885

0 commit comments

Comments
 (0)