summaryrefslogtreecommitdiffstats
path: root/284.patch
blob: 7462b9c6a628800e7eb363efe295cf6632992116 (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
From 46e8fa27851693877c32d0dd1239789bf2a78865 Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Wed, 2 Sep 2020 09:50:49 +0200
Subject: [PATCH] fix for 8.0.0beta3

---
 src/php7/igbinary.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/php7/igbinary.c b/src/php7/igbinary.c
index 992867a..d62e8dd 100644
--- a/src/php7/igbinary.c
+++ b/src/php7/igbinary.c
@@ -2751,7 +2751,11 @@ inline static int igbinary_unserialize_object(struct igbinary_unserialize_data *
 				break;
 			}
 			if (incomplete_class) {
+#if PHP_VERSION_ID >= 80000
+				php_store_class_name(z, class_name);
+#else
 				php_store_class_name(z, ZSTR_VAL(class_name), ZSTR_LEN(class_name));
+#endif
 #if PHP_VERSION_ID >= 70400
 			} else {
 				if (zend_hash_str_exists(&ce->function_table, "__unserialize", sizeof("__unserialize") - 1)) {
@@ -2802,7 +2806,11 @@ inline static int igbinary_unserialize_object(struct igbinary_unserialize_data *
 			}
 
 			if (incomplete_class) {
+#if PHP_VERSION_ID >= 80000
+				php_store_class_name(z, class_name);
+#else
 				php_store_class_name(z, ZSTR_VAL(class_name), ZSTR_LEN(class_name));
+#endif
 			}
 			struct igbinary_value_ref *ref = &IGB_REF_VAL_2(igsd, ref_n);
 			if ((flags & WANT_REF) != 0) {