diff --git a/NEWS b/NEWS index a85f9259e1a..1926343486e 100644 --- a/NEWS +++ b/NEWS @@ -8,6 +8,9 @@ PHP NEWS . Fixed bug GH-13612 (Corrupted memory in destructor with weak references). (nielsdos) +- DOM: + . Add some missing ZPP checks. (nielsdos) + - FPM: . Fixed GH-11086 (FPM: config test runs twice in daemonised mode). (Jakub Zelenka) diff --git a/ext/dom/node.c b/ext/dom/node.c index b95bf6c40fb..43f03f5e96b 100644 --- a/ext/dom/node.c +++ b/ext/dom/node.c @@ -2066,12 +2066,20 @@ PHP_METHOD(DOMNode, getRootNode) 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(); }