Merge branch 'PHP-8.2' into PHP-8.3

* PHP-8.2:
  Add ZPP checks in DOMNode::{__sleep,__wakeup}
This commit is contained in:
Niels Dossche 2024-03-09 23:20:16 +01:00
commit 134464e451
2 changed files with 11 additions and 0 deletions

3
NEWS
View file

@ -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)

View file

@ -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();
}