mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Add ZPP checks in DOMNode::{__sleep,__wakeup}
Closes GH-13651.
This commit is contained in:
3
NEWS
3
NEWS
@@ -6,6 +6,9 @@ PHP NEWS
|
||||
. Fixed bug GH-13612 (Corrupted memory in destructor with weak references).
|
||||
(nielsdos)
|
||||
|
||||
- DOM:
|
||||
. Add some missing ZPP checks. (nielsdos)
|
||||
|
||||
- Gettext:
|
||||
. Fixed sigabrt raised with dcgettext/dcngettext calls with gettext 0.22.5
|
||||
with category set to LC_ALL. (David Carlier)
|
||||
|
||||
@@ -1797,12 +1797,20 @@ PHP_METHOD(DOMNode, getLineNo)
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user