Skip to content

Commit d085b37

Browse files
committed
fix #36859 (DOMElement crashes when calling __construct when clone'ing)
1 parent 65d704c commit d085b37

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ PHP NEWS
1111
- Removed the E_STRICT deprecation notice from "var". (Ilia)
1212
- Fixed debug_zval_dump() to support private and protected members. (Dmitry)
1313
- Fixed SoapFault::getMessage(). (Dmitry)
14+
- Fixed bug #36859 (DOMElement crashes when calling __construct when
15+
clone'ing). (Tony)
1416
- Fixed bug #36825 (Exceptions thrown in ArrayObject::offsetGet cause
1517
segfault). (Tony)
1618
- Fixed bug #36820 (Privileged connection with an Oracle password file fails).

ext/dom/php_dom.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,7 @@ zend_object_value dom_objects_store_clone_obj(zval *zobject TSRMLS_DC)
443443
retval.handle = zend_objects_store_put(new_object, obj->dtor, obj->free_storage, obj->clone TSRMLS_CC);
444444
intern = (dom_object *) new_object;
445445
intern->handle = retval.handle;
446+
intern->ptr = NULL;
446447
retval.handlers = Z_OBJ_HT_P(zobject);
447448

448449
old_object = (dom_object *) obj->object;

0 commit comments

Comments
 (0)