Skip to content

Commit 134464e

Browse files
committed
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2: Add ZPP checks in DOMNode::{__sleep,__wakeup}
2 parents 5cbcc10 + e3711af commit 134464e

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ PHP NEWS
88
. Fixed bug GH-13612 (Corrupted memory in destructor with weak references).
99
(nielsdos)
1010

11+
- DOM:
12+
. Add some missing ZPP checks. (nielsdos)
13+
1114
- FPM:
1215
. Fixed GH-11086 (FPM: config test runs twice in daemonised mode).
1316
(Jakub Zelenka)

ext/dom/node.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2066,12 +2066,20 @@ PHP_METHOD(DOMNode, getRootNode)
20662066

20672067
PHP_METHOD(DOMNode, __sleep)
20682068
{
2069+
if (zend_parse_parameters_none() != SUCCESS) {
2070+
RETURN_THROWS();
2071+
}
2072+
20692073
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));
20702074
RETURN_THROWS();
20712075
}
20722076

20732077
PHP_METHOD(DOMNode, __wakeup)
20742078
{
2079+
if (zend_parse_parameters_none() != SUCCESS) {
2080+
RETURN_THROWS();
2081+
}
2082+
20752083
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));
20762084
RETURN_THROWS();
20772085
}

0 commit comments

Comments
 (0)