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:
authorPavlo Yatsukhnenko <yatsukhnenko@gmail.com>2016-11-12 14:52:34 +0300
committerPavlo Yatsukhnenko <yatsukhnenko@gmail.com>2016-11-12 17:26:57 +0300
commit98737bc02db8eb13a8298cf242b5f673eac5cabe (patch)
tree7c78b6899e282cfb8624b7965f913df1336b6d3b /cluster_library.c
parentbb8e630286178b16c6e72dfbd6aa67f5e2f85e74 (diff)
WIP: php7 compatibility
Diffstat (limited to 'cluster_library.c')
-rw-r--r--cluster_library.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/cluster_library.c b/cluster_library.c
index 8d9b9b6d..0f2f9583 100644
--- a/cluster_library.c
+++ b/cluster_library.c
@@ -1816,7 +1816,7 @@ PHP_REDIS_API void cluster_unsub_resp(INTERNAL_FUNCTION_PARAMETERS,
/* Recursive MULTI BULK -> PHP style response handling */
static void cluster_mbulk_variant_resp(clusterReply *r, zval *z_ret)
{
- zval *z_sub_ele;
+ zval zv, *z_sub_ele = &zv;
int i;
switch(r->type) {
@@ -1835,7 +1835,9 @@ static void cluster_mbulk_variant_resp(clusterReply *r, zval *z_ret)
}
break;
case TYPE_MULTIBULK:
+#if (PHP_MAJOR_VERSION < 7)
MAKE_STD_ZVAL(z_sub_ele);
+#endif
array_init(z_sub_ele);
for(i=0;i<r->elements;i++) {
cluster_mbulk_variant_resp(r->element[i], z_sub_ele);