summaryrefslogtreecommitdiffstats
path: root/9d15f07adb0de7ae02111f942bf7d0957bbc25d0.patch
blob: 409396878ad911a79497801a4d2594a94aeb90ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
From 9d15f07adb0de7ae02111f942bf7d0957bbc25d0 Mon Sep 17 00:00:00 2001
From: Pavlo Yatsukhnenko <yatsukhnenko@gmail.com>
Date: Fri, 20 Oct 2017 16:37:11 +0300
Subject: [PATCH] Issue #1224

---
 redis.c         | 2 ++
 redis_array.c   | 2 ++
 redis_cluster.c | 2 ++
 3 files changed, 6 insertions(+)

diff --git a/redis.c b/redis.c
index ff83159f..18e7ef90 100644
--- a/redis.c
+++ b/redis.c
@@ -547,6 +547,8 @@ create_redis_object(zend_class_entry *ce TSRMLS_DC)
     zval *tmp;
     zend_hash_copy(redis->std.properties, &ce->default_properties,
         (copy_ctor_func_t)zval_add_ref, (void *)&tmp, sizeof(zval *));
+#else
+    object_properties_init(&redis->std, ce);
 #endif
 
     retval.handle = zend_objects_store_put(redis,
diff --git a/redis_array.c b/redis_array.c
index b293253f..01a48e5f 100644
--- a/redis_array.c
+++ b/redis_array.c
@@ -187,6 +187,8 @@ create_redis_array_object(zend_class_entry *ce TSRMLS_DC)
     zval *tmp;
     zend_hash_copy(obj->std.properties, &ce->default_properties,
         (copy_ctor_func_t)zval_add_ref, (void *)&tmp, sizeof(zval *));
+#else
+    object_properties_init(&obj->std, ce);
 #endif
 
     retval.handle = zend_objects_store_put(obj,
diff --git a/redis_cluster.c b/redis_cluster.c
index 94b0077c..f1136471 100644
--- a/redis_cluster.c
+++ b/redis_cluster.c
@@ -332,6 +332,8 @@ create_cluster_context(zend_class_entry *class_type TSRMLS_DC) {
 
     zend_hash_copy(cluster->std.properties, &class_type->default_properties,
         (copy_ctor_func_t)zval_add_ref, (void*)&tmp, sizeof(zval*));
+#else
+    object_properties_init(&cluster->std, class_type);
 #endif
 
     retval.handle = zend_objects_store_put(cluster,