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

Skip to content

Commit 60d8b67

Browse files
Handle references in MGET (#1535)
Fixes #1534
1 parent bfaa89a commit 60d8b67

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

redis_array.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -924,6 +924,9 @@ PHP_METHOD(RedisArray, mget)
924924
unsigned int key_len;
925925
char kbuf[40], *key_lookup;
926926

927+
/* Handle the possibility that we're a reference */
928+
ZVAL_DEREF(data);
929+
927930
/* phpredis proper can only use string or long keys, so restrict to that here */
928931
if (Z_TYPE_P(data) != IS_STRING && Z_TYPE_P(data) != IS_LONG) {
929932
php_error_docref(NULL TSRMLS_CC, E_ERROR, "MGET: all keys must be strings or longs");

0 commit comments

Comments
 (0)