1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Merge branch 'PHP-8.3'

* PHP-8.3:
  Add ZPP checks in DOMNode::{__sleep,__wakeup}
This commit is contained in:
Niels Dossche
2024-03-09 23:20:29 +01:00

View File

@@ -2758,12 +2758,20 @@ PHP_METHOD(DOM_Node, __construct)
PHP_METHOD(DOMNode, __sleep)
{
if (zend_parse_parameters_none() != SUCCESS) {
RETURN_THROWS();
}
zend_throw_exception_ex(NULL, 0, "Serialization of '%s' is not allowed, unless serialization methods are implemented in a subclass", ZSTR_VAL(Z_OBJCE_P(ZEND_THIS)->name));
RETURN_THROWS();
}
PHP_METHOD(DOMNode, __wakeup)
{
if (zend_parse_parameters_none() != SUCCESS) {
RETURN_THROWS();
}
zend_throw_exception_ex(NULL, 0, "Unserialization of '%s' is not allowed, unless unserialization methods are implemented in a subclass", ZSTR_VAL(Z_OBJCE_P(ZEND_THIS)->name));
RETURN_THROWS();
}