blob: f08b9c48089346406cb37b410e477bbf8189abcd (
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
|
From 0f782ffe52cebd0a65356427b7ab72d48b72d20c Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@php.net>
Date: Thu, 22 Jul 2021 12:59:04 +0200
Subject: [PATCH] Fix #1 compatibility with 8.1.0beta1
---
.gitignore | 1 +
xmlrpc-epi-php.c | 6 +++++-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/xmlrpc-epi-php.c b/xmlrpc-epi-php.c
index e3120b8..2d0b367 100644
--- a/xmlrpc-epi-php.c
+++ b/xmlrpc-epi-php.c
@@ -227,10 +227,14 @@ PHP_MINIT_FUNCTION(xmlrpc)
zend_class_entry ce;
INIT_CLASS_ENTRY(ce, "XmlRpcServer", class_XmlRpcServer_methods);
xmlrpc_server_ce = zend_register_internal_class(&ce);
- xmlrpc_server_ce->ce_flags |= ZEND_ACC_FINAL;
xmlrpc_server_ce->create_object = xmlrpc_server_create_object;
+#if PHP_VERSION_ID < 80100
xmlrpc_server_ce->serialize = zend_class_serialize_deny;
xmlrpc_server_ce->unserialize = zend_class_unserialize_deny;
+ xmlrpc_server_ce->ce_flags |= ZEND_ACC_FINAL;
+#else
+ xmlrpc_server_ce->ce_flags |= ZEND_ACC_FINAL | ZEND_ACC_NOT_SERIALIZABLE;
+#endif
memcpy(&xmlrpc_server_object_handlers, &std_object_handlers, sizeof(zend_object_handlers));
xmlrpc_server_object_handlers.offset = XtOffsetOf(xmlrpc_server_data, std);
|