mirror of
https://github.com/danog/ext-uv.git
synced 2024-11-30 04:29:01 +01:00
Only use zend_class_serialize_deny and zend_class_unserialize_deny in PHP versions before 8.1 (#101)
Refs: https://github.com/amphp/ext-uv/issues/100
This commit is contained in:
parent
67f261f3a1
commit
35728fba67
5
php_uv.c
5
php_uv.c
@ -2679,9 +2679,14 @@ static zend_class_entry *php_uv_register_internal_class_ex(const char *name, zen
|
||||
ce.name = zend_new_interned_string(zend_string_init(name, strlen(name), 1));
|
||||
ce.info.internal.builtin_functions = php_uv_empty_methods;
|
||||
new = zend_register_internal_class_ex(&ce, parent);
|
||||
#if PHP_VERSION_ID < 80100
|
||||
new->serialize = zend_class_serialize_deny;
|
||||
new->unserialize = zend_class_unserialize_deny;
|
||||
#endif
|
||||
new->ce_flags |= ZEND_ACC_FINAL;
|
||||
#if PHP_VERSION_ID >= 80100
|
||||
new->ce_flags |= ZEND_ACC_NOT_SERIALIZABLE ;
|
||||
#endif
|
||||
new->create_object = php_uv_create_uv;
|
||||
|
||||
return new;
|
||||
|
Loading…
Reference in New Issue
Block a user