diff options
author | Pavlo Yatsukhnenko <yatsukhnenko@gmail.com> | 2017-07-28 14:18:26 +0300 |
---|---|---|
committer | Pavlo Yatsukhnenko <yatsukhnenko@gmail.com> | 2017-07-28 14:50:41 +0300 |
commit | faac8b06000508a6a6e4be94019d2fda030a92c7 (patch) | |
tree | 7dd4c6ca04f7b0ce4a90a33b1926297276735f83 /redis_array.c | |
parent | eff7398606c43e639db79056a69edc3e6e981322 (diff) |
CID 158616
Diffstat (limited to 'redis_array.c')
-rw-r--r-- | redis_array.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/redis_array.c b/redis_array.c index ce3a6eb1..d88bd2d0 100644 --- a/redis_array.c +++ b/redis_array.c @@ -976,9 +976,7 @@ PHP_METHOD(RedisArray, mget) } for(i = 0, j = 0; i < argc; ++i) { - if(pos[i] != n) continue; - - z_cur = zend_hash_index_find(Z_ARRVAL(z_ret), j++); + if (pos[i] != n || (z_cur = zend_hash_index_find(Z_ARRVAL(z_ret), j++)) == NULL) continue; #if (PHP_MAJOR_VERSION < 7) MAKE_STD_ZVAL(z_tmp); @@ -995,7 +993,7 @@ PHP_METHOD(RedisArray, mget) array_init(return_value); /* copy temp array in the right order to return_value */ for(i = 0; i < argc; ++i) { - z_cur = zend_hash_index_find(Z_ARRVAL(z_tmp_array), i); + if ((z_cur = zend_hash_index_find(Z_ARRVAL(z_tmp_array), i)) == NULL) continue; #if (PHP_MAJOR_VERSION < 7) MAKE_STD_ZVAL(z_tmp); |