summaryrefslogtreecommitdiffstats
path: root/33.patch
blob: 45a7ed4ee6c6bbc8c094b80cda84fe62339b206a (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
From 151df28b1b6d545ad71846f11a3a3af65bb1f3be Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Wed, 21 Jul 2021 08:32:57 +0200
Subject: [PATCH] fix for 8.1.0beta1

---
 couchbase.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/couchbase.h b/couchbase.h
index bc93c10..9748205 100644
--- a/couchbase.h
+++ b/couchbase.h
@@ -243,11 +243,18 @@ void pcbc_exception_init(zval *return_value, long code, const char *message);
 #define PCBC_ALLOC_OBJECT_T(obj_t, class_type)                                                                         \
     (obj_t *)ecalloc(1, sizeof(obj_t) + zend_object_properties_size(class_type))
 
+#if PHP_VERSION_ID < 80100
 #define PCBC_CE_DISABLE_SERIALIZATION(ce)                                                                              \
     do {                                                                                                               \
         ce->serialize = zend_class_serialize_deny;                                                                     \
         ce->unserialize = zend_class_unserialize_deny;                                                                 \
     } while (0);
+#else
+#define PCBC_CE_DISABLE_SERIALIZATION(ce)                                                                              \
+    do {                                                                                                               \
+        ce->ce_flags |= ZEND_ACC_NOT_SERIALIZABLE;                                                                        \
+    } while (0);
+#endif
 
 #define PCBC_STRLEN_P(__pcbc_zval) Z_STRLEN((__pcbc_zval))
 #define PCBC_STRVAL_P(__pcbc_zval) Z_STRVAL((__pcbc_zval))