Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpredis/phpredis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Grunder <michael.grunder@gmail.com>2019-03-29 08:02:27 +0300
committerGitHub <noreply@github.com>2019-03-29 08:02:27 +0300
commit60d8b679b3d948176f7dfc13c47da3d9deea926c (patch)
tree80a8a4fd135b75d9dbdcd36fbd4dd3c5ca338a99 /redis_array.c
parentbfaa89a8ae9b6a82dd8f3156e150ae898ee201be (diff)
Handle references in MGET (#1535)
Fixes #1534
Diffstat (limited to 'redis_array.c')
-rw-r--r--redis_array.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/redis_array.c b/redis_array.c
index 67e117dd..b4848d1d 100644
--- a/redis_array.c
+++ b/redis_array.c
@@ -924,6 +924,9 @@ PHP_METHOD(RedisArray, mget)
unsigned int key_len;
char kbuf[40], *key_lookup;
+ /* Handle the possibility that we're a reference */
+ ZVAL_DEREF(data);
+
/* phpredis proper can only use string or long keys, so restrict to that here */
if (Z_TYPE_P(data) != IS_STRING && Z_TYPE_P(data) != IS_LONG) {
php_error_docref(NULL TSRMLS_CC, E_ERROR, "MGET: all keys must be strings or longs");