Skip to content

Commit 3c74f4a

Browse files
committed
Merge branch 'PHP-8.3'
* PHP-8.3: Add ZPP checks in DOMNode::{__sleep,__wakeup}
2 parents 58a14fb + 134464e commit 3c74f4a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

ext/dom/node.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2758,12 +2758,20 @@ PHP_METHOD(DOM_Node, __construct)
27582758

27592759
PHP_METHOD(DOMNode, __sleep)
27602760
{
2761+
if (zend_parse_parameters_none() != SUCCESS) {
2762+
RETURN_THROWS();
2763+
}
2764+
27612765
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));
27622766
RETURN_THROWS();
27632767
}
27642768

27652769
PHP_METHOD(DOMNode, __wakeup)
27662770
{
2771+
if (zend_parse_parameters_none() != SUCCESS) {
2772+
RETURN_THROWS();
2773+
}
2774+
27672775
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));
27682776
RETURN_THROWS();
27692777
}

0 commit comments

Comments
 (0)