mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3: Fix #79271: DOMDocumentType::$childNodes is NULL
This commit is contained in:
commit
73a4c50309
4 changed files with 23 additions and 9 deletions
1
NEWS
1
NEWS
|
@ -20,6 +20,7 @@ PHP NEWS
|
|||
- DOM:
|
||||
. Fixed bug #77569: (Write Access Violation in DomImplementation). (Nikita,
|
||||
cmb)
|
||||
. Fixed bug #79271 (DOMDocumentType::$childNodes is NULL). (cmb)
|
||||
|
||||
- PCRE:
|
||||
. Fixed bug #79188 (Memory corruption in preg_replace/preg_replace_callback
|
||||
|
|
|
@ -431,13 +431,9 @@ int dom_node_child_nodes_read(dom_object *obj, zval *retval)
|
|||
return FAILURE;
|
||||
}
|
||||
|
||||
if (dom_node_children_valid(nodep) == FAILURE) {
|
||||
ZVAL_NULL(retval);
|
||||
} else {
|
||||
php_dom_create_interator(retval, DOM_NODELIST);
|
||||
intern = Z_DOMOBJ_P(retval);
|
||||
dom_namednode_iter(obj, XML_ELEMENT_NODE, intern, NULL, NULL, NULL);
|
||||
}
|
||||
php_dom_create_interator(retval, DOM_NODELIST);
|
||||
intern = Z_DOMOBJ_P(retval);
|
||||
dom_namednode_iter(obj, XML_ELEMENT_NODE, intern, NULL, NULL, NULL);
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ object(DOMText)#%d (19) {
|
|||
["parentNode"]=>
|
||||
NULL
|
||||
["childNodes"]=>
|
||||
NULL
|
||||
string(22) "(object value omitted)"
|
||||
["firstChild"]=>
|
||||
NULL
|
||||
["lastChild"]=>
|
||||
|
@ -140,7 +140,7 @@ object(DOMText)#%d (19) {
|
|||
["parentNode"]=>
|
||||
NULL
|
||||
["childNodes"]=>
|
||||
NULL
|
||||
string(22) "(object value omitted)"
|
||||
["firstChild"]=>
|
||||
NULL
|
||||
["lastChild"]=>
|
||||
|
|
17
ext/dom/tests/bug79271.phpt
Normal file
17
ext/dom/tests/bug79271.phpt
Normal file
|
@ -0,0 +1,17 @@
|
|||
--TEST--
|
||||
Bug #79271 (DOMDocumentType::$childNodes is NULL)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('dom')) die('skip dom extension not available');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$dom = new DOMImplementation();
|
||||
$type = $dom->createDocumentType('html');
|
||||
var_dump($type->childNodes);
|
||||
?>
|
||||
--EXPECTF--
|
||||
object(DOMNodeList)#%d (1) {
|
||||
["length"]=>
|
||||
int(0)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue