com php-src: Revert "Fix #70029: nodeValue of DOMElement list content of children nodes": UPGRADING ext/dom/node.c ext/dom/tests/bug28721.phpt
ext/dom/tests/bug42082.phpt ext/dom/tests/bug69846.phpt ext/dom/tests/bug70029.phpt ext/dom/tests/dom001.phpt
| From: | Christoph Michael Becker | Date: | Sun, 06 Sep 2015 13:36:43 +0000 |
| Subject: | com php-src: Revert "Fix #70029: nodeValue of DOMElement list content of children nodes": UPGRADING ext/dom/node.c ext/dom/tests/bug28721.phpt ext/dom/tests/bug42082.phpt ext/dom/tests/bug69846.phpt ext/dom/tests/bug70029.phpt ext/dom/tests/dom001.phpt |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-88930@lists.php.net to get a copy of this message | ||
Commit: 1b344f55f4dc033cba41a94cbe0d2fdc2ad606a6
Author: Christoph M. Becker <cmb@php.net> Sun, 6 Sep 2015 15:36:43 +0200
Parents: 892a745ef12bf00beaa2509a5035d10b22317ed0
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=1b344f55f4dc033cba41a94cbe0d2fdc2ad606a6
Log:
Revert "Fix #70029: nodeValue of DOMElement list content of children nodes"
This reverts commit 25a52d98d7cb2d4f3b3636eac45c71a1ae03c760.
Bugs:
https://bugs.php.net/70029
Changed paths:
M UPGRADING
M ext/dom/node.c
M ext/dom/tests/bug28721.phpt
M ext/dom/tests/bug42082.phpt
M ext/dom/tests/bug69846.phpt
D ext/dom/tests/bug70029.phpt
M ext/dom/tests/dom001.phpt
diff --git a/UPGRADING b/UPGRADING index 7d324f2..f75f977 100644 --- a/UPGRADING +++ b/UPGRADING @@ -450,9 +450,6 @@ Other . dba_delete() now returns false if the key was not found for the inifile handler, too. -- DOM: - . DOMElement::nodeValue is now null, according to W3C DOM Core Level 3. - - GMP . Requires libgmp version 4.2 or newer now. . gmp_setbit() and gmp_clrbit() now return FALSE for negative indices, making diff --git a/ext/dom/node.c b/ext/dom/node.c index 08e4332..2f35e01 100644 --- a/ext/dom/node.c +++ b/ext/dom/node.c @@ -297,6 +297,7 @@ int dom_node_node_value_read(dom_object *obj, zval *retval) switch (nodep->type) { case XML_ATTRIBUTE_NODE: case XML_TEXT_NODE: + case XML_ELEMENT_NODE: case XML_COMMENT_NODE: case XML_CDATA_SECTION_NODE: case XML_PI_NODE: diff --git a/ext/dom/tests/bug28721.phpt b/ext/dom/tests/bug28721.phpt index cd55150..464498e 100644 --- a/ext/dom/tests/bug28721.phpt +++ b/ext/dom/tests/bug28721.phpt @@ -119,65 +119,66 @@ print_node_r($p); ?> --EXPECT-- -name (value): p () + +name (value): p ( t1 X t2 xxx ) parent: NULL previousSibling: NULL nextSibling: NULL name (value): #text ( t1 ) - parent: name (value): p () + parent: name (value): p ( t1 X t2 xxx ) previousSibling: NULL - nextSibling: name (value): b () + nextSibling: name (value): b (X) - name (value): b () - parent: name (value): p () + name (value): b (X) + parent: name (value): p ( t1 X t2 xxx ) previousSibling: name (value): #text ( t1 ) nextSibling: name (value): #text ( t2 ) name (value): #text (X) - parent: name (value): b () + parent: name (value): b (X) previousSibling: NULL nextSibling: NULL name (value): #text ( t2 ) - parent: name (value): p () - previousSibling: name (value): b () + parent: name (value): p ( t1 X t2 xxx ) + previousSibling: name (value): b (X) nextSibling: name (value): #text ( xxx ) name (value): #text ( xxx ) - parent: name (value): p () + parent: name (value): p ( t1 X t2 xxx ) previousSibling: name (value): #text ( t2 ) nextSibling: NULL Append t1 to p: -name (value): p () +name (value): p (X t2 xxx t1 ) parent: NULL previousSibling: NULL nextSibling: NULL - name (value): b () - parent: name (value): p () + name (value): b (X) + parent: name (value): p (X t2 xxx t1 ) previousSibling: NULL nextSibling: name (value): #text ( t2 ) name (value): #text (X) - parent: name (value): b () + parent: name (value): b (X) previousSibling: NULL nextSibling: NULL name (value): #text ( t2 ) - parent: name (value): p () - previousSibling: name (value): b () + parent: name (value): p (X t2 xxx t1 ) + previousSibling: name (value): b (X) nextSibling: name (value): #text ( xxx ) name (value): #text ( xxx ) - parent: name (value): p () + parent: name (value): p (X t2 xxx t1 ) previousSibling: name (value): #text ( t2 ) nextSibling: name (value): #text ( t1 ) name (value): #text ( t1 ) - parent: name (value): p () + parent: name (value): p (X t2 xxx t1 ) previousSibling: name (value): #text ( xxx ) nextSibling: NULL @@ -185,18 +186,18 @@ t1 == ret: bool(true) div: -name (value): div () +name (value): div ( t3 t4 xxx ) parent: NULL previousSibling: NULL nextSibling: NULL name (value): #text ( t3 ) - parent: name (value): div () + parent: name (value): div ( t3 t4 xxx ) previousSibling: NULL nextSibling: name (value): b () name (value): b () - parent: name (value): div () + parent: name (value): div ( t3 t4 xxx ) previousSibling: name (value): #text ( t3 ) nextSibling: name (value): #text ( t4 ) @@ -206,34 +207,34 @@ nextSibling: NULL nextSibling: NULL name (value): #text ( t4 ) - parent: name (value): div () + parent: name (value): div ( t3 t4 xxx ) previousSibling: name (value): b () nextSibling: name (value): #text ( xxx ) name (value): #text ( xxx ) - parent: name (value): div () + parent: name (value): div ( t3 t4 xxx ) previousSibling: name (value): #text ( t4 ) nextSibling: NULL Insert t4 before t3: -name (value): div () +name (value): div ( t4 t3 xxx ) parent: NULL previousSibling: NULL nextSibling: NULL name (value): #text ( t4 ) - parent: name (value): div () + parent: name (value): div ( t4 t3 xxx ) previousSibling: NULL nextSibling: name (value): #text ( t3 ) name (value): #text ( t3 ) - parent: name (value): div () + parent: name (value): div ( t4 t3 xxx ) previousSibling: name (value): #text ( t4 ) nextSibling: name (value): b () name (value): b () - parent: name (value): div () + parent: name (value): div ( t4 t3 xxx ) previousSibling: name (value): #text ( t3 ) nextSibling: name (value): #text ( xxx ) @@ -243,40 +244,40 @@ nextSibling: NULL nextSibling: NULL name (value): #text ( xxx ) - parent: name (value): div () + parent: name (value): div ( t4 t3 xxx ) previousSibling: name (value): b () nextSibling: NULL p: -name (value): p () +name (value): p (X t2 xxx t1 ) parent: NULL previousSibling: NULL nextSibling: NULL - name (value): b () - parent: name (value): p () + name (value): b (X) + parent: name (value): p (X t2 xxx t1 ) previousSibling: NULL nextSibling: name (value): #text ( t2 ) name (value): #text (X) - parent: name (value): b () + parent: name (value): b (X) previousSibling: NULL nextSibling: NULL name (value): #text ( t2 ) - parent: name (value): p () - previousSibling: name (value): b () + parent: name (value): p (X t2 xxx t1 ) + previousSibling: name (value): b (X) nextSibling: name (value): #text ( xxx ) name (value): #text ( xxx ) - parent: name (value): p () + parent: name (value): p (X t2 xxx t1 ) previousSibling: name (value): #text ( t2 ) nextSibling: name (value): #text ( t1 ) name (value): #text ( t1 ) - parent: name (value): p () + parent: name (value): p (X t2 xxx t1 ) previousSibling: name (value): #text ( xxx ) nextSibling: NULL @@ -290,73 +291,73 @@ nextSibling: NULL name (value): #text ( t5 ) parent: name (value): #document-fragment () previousSibling: NULL - nextSibling: name (value): i () + nextSibling: name (value): i ( frob ) - name (value): i () + name (value): i ( frob ) parent: name (value): #document-fragment () previousSibling: name (value): #text ( t5 ) nextSibling: name (value): #text ( t6 ) name (value): #text ( frob ) - parent: name (value): i () + parent: name (value): i ( frob ) previousSibling: NULL nextSibling: NULL name (value): #text ( t6 ) parent: name (value): #document-fragment () - previousSibling: name (value): i () + previousSibling: name (value): i ( frob ) nextSibling: NULL Appending fragment to p: -name (value): p () +name (value): p (X t2 xxx t1 t5 frob t6 ) parent: NULL previousSibling: NULL nextSibling: NULL - name (value): b () - parent: name (value): p () + name (value): b (X) + parent: name (value): p (X t2 xxx t1 t5 frob t6 ) previousSibling: NULL nextSibling: name (value): #text ( t2 ) name (value): #text (X) - parent: name (value): b () + parent: name (value): b (X) previousSibling: NULL nextSibling: NULL name (value): #text ( t2 ) - parent: name (value): p () - previousSibling: name (value): b () + parent: name (value): p (X t2 xxx t1 t5 frob t6 ) + previousSibling: name (value): b (X) nextSibling: name (value): #text ( xxx ) name (value): #text ( xxx ) - parent: name (value): p () + parent: name (value): p (X t2 xxx t1 t5 frob t6 ) previousSibling: name (value): #text ( t2 ) nextSibling: name (value): #text ( t1 ) name (value): #text ( t1 ) - parent: name (value): p () + parent: name (value): p (X t2 xxx t1 t5 frob t6 ) previousSibling: name (value): #text ( xxx ) nextSibling: name (value): #text ( t5 ) name (value): #text ( t5 ) - parent: name (value): p () + parent: name (value): p (X t2 xxx t1 t5 frob t6 ) previousSibling: name (value): #text ( t1 ) - nextSibling: name (value): i () + nextSibling: name (value): i ( frob ) - name (value): i () - parent: name (value): p () + name (value): i ( frob ) + parent: name (value): p (X t2 xxx t1 t5 frob t6 ) previousSibling: name (value): #text ( t5 ) nextSibling: name (value): #text ( t6 ) name (value): #text ( frob ) - parent: name (value): i () + parent: name (value): i ( frob ) previousSibling: NULL nextSibling: NULL name (value): #text ( t6 ) - parent: name (value): p () - previousSibling: name (value): i () + parent: name (value): p (X t2 xxx t1 t5 frob t6 ) + previousSibling: name (value): i ( frob ) nextSibling: NULL Fragment: @@ -368,23 +369,23 @@ nextSibling: NULL div: -name (value): div () +name (value): div ( t4 t3 xxx ) parent: NULL previousSibling: NULL nextSibling: NULL name (value): #text ( t4 ) - parent: name (value): div () + parent: name (value): div ( t4 t3 xxx ) previousSibling: NULL nextSibling: name (value): #text ( t3 ) name (value): #text ( t3 ) - parent: name (value): div () + parent: name (value): div ( t4 t3 xxx ) previousSibling: name (value): #text ( t4 ) nextSibling: name (value): b () name (value): b () - parent: name (value): div () + parent: name (value): div ( t4 t3 xxx ) previousSibling: name (value): #text ( t3 ) nextSibling: name (value): #text ( xxx ) @@ -394,30 +395,30 @@ nextSibling: NULL nextSibling: NULL name (value): #text ( xxx ) - parent: name (value): div () + parent: name (value): div ( t4 t3 xxx ) previousSibling: name (value): b () nextSibling: NULL Inserting fragment before t4 Error (2) on line 109: DOMNode::insertBefore(): Document Fragment is empty -name (value): div () +name (value): div ( t4 t3 xxx ) parent: NULL previousSibling: NULL nextSibling: NULL name (value): #text ( t4 ) - parent: name (value): div () + parent: name (value): div ( t4 t3 xxx ) previousSibling: NULL nextSibling: name (value): #text ( t3 ) name (value): #text ( t3 ) - parent: name (value): div () + parent: name (value): div ( t4 t3 xxx ) previousSibling: name (value): #text ( t4 ) nextSibling: name (value): b () name (value): b () - parent: name (value): div () + parent: name (value): div ( t4 t3 xxx ) previousSibling: name (value): #text ( t3 ) nextSibling: name (value): #text ( xxx ) @@ -427,58 +428,58 @@ nextSibling: NULL nextSibling: NULL name (value): #text ( xxx ) - parent: name (value): div () + parent: name (value): div ( t4 t3 xxx ) previousSibling: name (value): b () nextSibling: NULL p: -name (value): p () +name (value): p (X t2 xxx t1 t5 frob t6 ) parent: NULL previousSibling: NULL nextSibling: NULL - name (value): b () - parent: name (value): p () + name (value): b (X) + parent: name (value): p (X t2 xxx t1 t5 frob t6 ) previousSibling: NULL nextSibling: name (value): #text ( t2 ) name (value): #text (X) - parent: name (value): b () + parent: name (value): b (X) previousSibling: NULL nextSibling: NULL name (value): #text ( t2 ) - parent: name (value): p () - previousSibling: name (value): b () + parent: name (value): p (X t2 xxx t1 t5 frob t6 ) + previousSibling: name (value): b (X) nextSibling: name (value): #text ( xxx ) name (value): #text ( xxx ) - parent: name (value): p () + parent: name (value): p (X t2 xxx t1 t5 frob t6 ) previousSibling: name (value): #text ( t2 ) nextSibling: name (value): #text ( t1 ) name (value): #text ( t1 ) - parent: name (value): p () + parent: name (value): p (X t2 xxx t1 t5 frob t6 ) previousSibling: name (value): #text ( xxx ) nextSibling: name (value): #text ( t5 ) name (value): #text ( t5 ) - parent: name (value): p () + parent: name (value): p (X t2 xxx t1 t5 frob t6 ) previousSibling: name (value): #text ( t1 ) - nextSibling: name (value): i () + nextSibling: name (value): i ( frob ) - name (value): i () - parent: name (value): p () + name (value): i ( frob ) + parent: name (value): p (X t2 xxx t1 t5 frob t6 ) previousSibling: name (value): #text ( t5 ) nextSibling: name (value): #text ( t6 ) name (value): #text ( frob ) - parent: name (value): i () + parent: name (value): i ( frob ) previousSibling: NULL nextSibling: NULL name (value): #text ( t6 ) - parent: name (value): p () - previousSibling: name (value): i () + parent: name (value): p (X t2 xxx t1 t5 frob t6 ) + previousSibling: name (value): i ( frob ) nextSibling: NULL diff --git a/ext/dom/tests/bug42082.phpt b/ext/dom/tests/bug42082.phpt index 98fa638..b5fc893 100644 --- a/ext/dom/tests/bug42082.phpt +++ b/ext/dom/tests/bug42082.phpt @@ -22,9 +22,9 @@ DOMNodeList int(0) bool(true) bool(true) -NULL +string(0) "" +bool(true) bool(true) -bool(false) bool(false) bool(false) ===DONE=== diff --git a/ext/dom/tests/bug69846.phpt b/ext/dom/tests/bug69846.phpt index a667a89..08e35cd 100644 --- a/ext/dom/tests/bug69846.phpt +++ b/ext/dom/tests/bug69846.phpt @@ -81,7 +81,11 @@ object(DOMElement)#%d (17) { ["nodeName"]=> string(5) "form1" ["nodeValue"]=> - NULL + string(39) " + Value A + Value B + Value C + " ["nodeType"]=> int(1) ["parentNode"]=> diff --git a/ext/dom/tests/bug70029.phpt b/ext/dom/tests/bug70029.phpt deleted file mode 100644 index 55244c6..0000000 --- a/ext/dom/tests/bug70029.phpt +++ /dev/null @@ -1,12 +0,0 @@ ---TEST-- -Bug #70029 (nodeValue of DOMElement list content of children nodes) ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php -$doc = new DOMDocument(); -$doc->loadXml('<tag><childtag>myString</childtag></tag>'); -var_dump($doc->documentElement->nodeValue); -?> ---EXPECT-- -NULL diff --git a/ext/dom/tests/dom001.phpt b/ext/dom/tests/dom001.phpt index 13e8fbf..a0c78fb 100644 --- a/ext/dom/tests/dom001.phpt +++ b/ext/dom/tests/dom001.phpt @@ -108,7 +108,7 @@ Num Children: 4 Node Name: title Node Type: 1 Num Children: 1 -Node Content: +Node Content: Title Node Name: #text Node Type: 3 @@ -142,7 +142,7 @@ Num Children: 4 Node Name: title Node Type: 1 Num Children: 1 -Node Content: +Node Content: Title Node Name: #text Node Type: 3 @@ -186,7 +186,7 @@ Node Content: en Node Name: Silly Node Type: 1 Num Children: 1 -Node Content: +Node Content: Symphony <?xml version="1.0" standalone="yes"?> <!DOCTYPE chapter SYSTEM "/share/sgml/Norman_Walsh/db3xml10/db3xml10.dtd" [ @@ -214,24 +214,24 @@ Node Content: Node Name: Silly Node Type: 1 Num Children: 1 -Node Content: +Node Content: Symphony Using elem Node Name: Silly Node Type: 1 Num Children: 1 -Node Content: +Node Content: Symphony --------- Unlink Node Node Name: Silly Node Type: 1 Num Children: 1 -Node Content: +Node Content: Symphony Node Name: title Node Type: 1 Num Children: 1 -Node Content: +Node Content: Title Node Name: #text Node Type: 3
diff --git a/UPGRADING b/UPGRADING index 7d324f2..f75f977 100644 --- a/UPGRADING +++ b/UPGRADING @@ -450,9 +450,6 @@ Other . dba_delete() now returns false if the key was not found for the inifile handler, too. -- DOM: - . DOMElement::nodeValue is now null, according to W3C DOM Core Level 3. - - GMP . Requires libgmp version 4.2 or newer now. . gmp_setbit() and gmp_clrbit() now return FALSE for negative indices, making diff --git a/ext/dom/node.c b/ext/dom/node.c index 08e4332..2f35e01 100644 --- a/ext/dom/node.c +++ b/ext/dom/node.c @@ -297,6 +297,7 @@ int dom_node_node_value_read(dom_object *obj, zval *retval) switch (nodep->type) { case XML_ATTRIBUTE_NODE: case XML_TEXT_NODE: + case XML_ELEMENT_NODE: case XML_COMMENT_NODE: case XML_CDATA_SECTION_NODE: case XML_PI_NODE: diff --git a/ext/dom/tests/bug28721.phpt b/ext/dom/tests/bug28721.phpt index cd55150..464498e 100644 --- a/ext/dom/tests/bug28721.phpt +++ b/ext/dom/tests/bug28721.phpt @@ -119,65 +119,66 @@ print_node_r($p); ?> --EXPECT-- -name (value): p () + +name (value): p ( t1 X t2 xxx ) parent: NULL previousSibling: NULL nextSibling: NULL name (value): #text ( t1 ) - parent: name (value): p () + parent: name (value): p ( t1 X t2 xxx ) previousSibling: NULL - nextSibling: name (value): b () + nextSibling: name (value): b (X) - name (value): b () - parent: name (value): p () + name (value): b (X) + parent: name (value): p ( t1 X t2 xxx ) previousSibling: name (value): #text ( t1 ) nextSibling: name (value): #text ( t2 ) name (value): #text (X) - parent: name (value): b () + parent: name (value): b (X) previousSibling: NULL nextSibling: NULL name (value): #text ( t2 ) - parent: name (value): p () - previousSibling: name (value): b () + parent: name (value): p ( t1 X t2 xxx ) + previousSibling: name (value): b (X) nextSibling: name (value): #text ( xxx ) name (value): #text ( xxx ) - parent: name (value): p () + parent: name (value): p ( t1 X t2 xxx ) previousSibling: name (value): #text ( t2 ) nextSibling: NULL Append t1 to p: -name (value): p () +name (value): p (X t2 xxx t1 ) parent: NULL previousSibling: NULL nextSibling: NULL - name (value): b () - parent: name (value): p () + name (value): b (X) + parent: name (value): p (X t2 xxx t1 ) previousSibling: NULL nextSibling: name (value): #text ( t2 ) name (value): #text (X) - parent: name (value): b () + parent: name (value): b (X) previousSibling: NULL nextSibling: NULL name (value): #text ( t2 ) - parent: name (value): p () - previousSibling: name (value): b () + parent: name (value): p (X t2 xxx t1 ) + previousSibling: name (value): b (X) nextSibling: name (value): #text ( xxx ) name (value): #text ( xxx ) - parent: name (value): p () + parent: name (value): p (X t2 xxx t1 ) previousSibling: name (value): #text ( t2 ) nextSibling: name (value): #text ( t1 ) name (value): #text ( t1 ) - parent: name (value): p () + parent: name (value): p (X t2 xxx t1 ) previousSibling: name (value): #text ( xxx ) nextSibling: NULL @@ -185,18 +186,18 @@ t1 == ret: bool(true) div: -name (value): div () +name (value): div ( t3 t4 xxx ) parent: NULL previousSibling: NULL nextSibling: NULL name (value): #text ( t3 ) - parent: name (value): div () + parent: name (value): div ( t3 t4 xxx ) previousSibling: NULL nextSibling: name (value): b () name (value): b () - parent: name (value): div () + parent: name (value): div ( t3 t4 xxx ) previousSibling: name (value): #text ( t3 ) nextSibling: name (value): #text ( t4 ) @@ -206,34 +207,34 @@ nextSibling: NULL nextSibling: NULL name (value): #text ( t4 ) - parent: name (value): div () + parent: name (value): div ( t3 t4 xxx ) previousSibling: name (value): b () nextSibling: name (value): #text ( xxx ) name (value): #text ( xxx ) - parent: name (value): div () + parent: name (value): div ( t3 t4 xxx ) previousSibling: name (value): #text ( t4 ) nextSibling: NULL Insert t4 before t3: -name (value): div () +name (value): div ( t4 t3 xxx ) parent: NULL previousSibling: NULL nextSibling: NULL name (value): #text ( t4 ) - parent: name (value): div () + parent: name (value): div ( t4 t3 xxx ) previousSibling: NULL nextSibling: name (value): #text ( t3 ) name (value): #text ( t3 ) - parent: name (value): div () + parent: name (value): div ( t4 t3 xxx ) previousSibling: name (value): #text ( t4 ) nextSibling: name (value): b () name (value): b () - parent: name (value): div () + parent: name (value): div ( t4 t3 xxx ) previousSibling: name (value): #text ( t3 ) nextSibling: name (value): #text ( xxx ) @@ -243,40 +244,40 @@ nextSibling: NULL nextSibling: NULL name (value): #text ( xxx ) - parent: name (value): div () + parent: name (value): div ( t4 t3 xxx ) previousSibling: name (value): b () nextSibling: NULL p: -name (value): p () +name (value): p (X t2 xxx t1 ) parent: NULL previousSibling: NULL nextSibling: NULL - name (value): b () - parent: name (value): p () + name (value): b (X) + parent: name (value): p (X t2 xxx t1 ) previousSibling: NULL nextSibling: name (value): #text ( t2 ) name (value): #text (X) - parent: name (value): b () + parent: name (value): b (X) previousSibling: NULL nextSibling: NULL name (value): #text ( t2 ) - parent: name (value): p () - previousSibling: name (value): b () + parent: name (value): p (X t2 xxx t1 ) + previousSibling: name (value): b (X) nextSibling: name (value): #text ( xxx ) name (value): #text ( xxx ) - parent: name (value): p () + parent: name (value): p (X t2 xxx t1 ) previousSibling: name (value): #text ( t2 ) nextSibling: name (value): #text ( t1 ) name (value): #text ( t1 ) - parent: name (value): p () + parent: name (value): p (X t2 xxx t1 ) previousSibling: name (value): #text ( xxx ) nextSibling: NULL @@ -290,73 +291,73 @@ nextSibling: NULL name (value): #text ( t5 ) parent: name (value): #document-fragment () previousSibling: NULL - nextSibling: name (value): i () + nextSibling: name (value): i ( frob ) - name (value): i () + name (value): i ( frob ) parent: name (value): #document-fragment () previousSibling: name (value): #text ( t5 ) nextSibling: name (value): #text ( t6 ) name (value): #text ( frob ) - parent: name (value): i () + parent: name (value): i ( frob ) previousSibling: NULL nextSibling: NULL name (value): #text ( t6 ) parent: name (value): #document-fragment () - previousSibling: name (value): i () + previousSibling: name (value): i ( frob ) nextSibling: NULL Appending fragment to p: -name (value): p () +name (value): p (X t2 xxx t1 t5 frob t6 ) parent: NULL previousSibling: NULL nextSibling: NULL - name (value): b () - parent: name (value): p () + name (value): b (X) + parent: name (value): p (X t2 xxx t1 t5 frob t6 ) previousSibling: NULL nextSibling: name (value): #text ( t2 ) name (value): #text (X) - parent: name (value): b () + parent: name (value): b (X) previousSibling: NULL nextSibling: NULL name (value): #text ( t2 ) - parent: name (value): p () - previousSibling: name (value): b () + parent: name (value): p (X t2 xxx t1 t5 frob t6 ) + previousSibling: name (value): b (X) nextSibling: name (value): #text ( xxx ) name (value): #text ( xxx ) - parent: name (value): p () + parent: name (value): p (X t2 xxx t1 t5 frob t6 ) previousSibling: name (value): #text ( t2 ) nextSibling: name (value): #text ( t1 ) name (value): #text ( t1 ) - parent: name (value): p () + parent: name (value): p (X t2 xxx t1 t5 frob t6 ) previousSibling: name (value): #text ( xxx ) nextSibling: name (value): #text ( t5 ) name (value): #text ( t5 ) - parent: name (value): p () + parent: name (value): p (X t2 xxx t1 t5 frob t6 ) previousSibling: name (value): #text ( t1 ) - nextSibling: name (value): i () + nextSibling: name (value): i ( frob ) - name (value): i () - parent: name (value): p () + name (value): i ( frob ) + parent: name (value): p (X t2 xxx t1 t5 frob t6 ) previousSibling: name (value): #text ( t5 ) nextSibling: name (value): #text ( t6 ) name (value): #text ( frob ) - parent: name (value): i () + parent: name (value): i ( frob ) previousSibling: NULL nextSibling: NULL name (value): #text ( t6 ) - parent: name (value): p () - previousSibling: name (value): i () + parent: name (value): p (X t2 xxx t1 t5 frob t6 ) + previousSibling: name (value): i ( frob ) nextSibling: NULL Fragment: @@ -368,23 +369,23 @@ nextSibling: NULL div: -name (value): div () +name (value): div ( t4 t3 xxx ) parent: NULL previousSibling: NULL nextSibling: NULL name (value): #text ( t4 ) - parent: name (value): div () + parent: name (value): div ( t4 t3 xxx ) previousSibling: NULL nextSibling: name (value): #text ( t3 ) name (value): #text ( t3 ) - parent: name (value): div () + parent: name (value): div ( t4 t3 xxx ) previousSibling: name (value): #text ( t4 ) nextSibling: name (value): b () name (value): b () - parent: name (value): div () + parent: name (value): div ( t4 t3 xxx ) previousSibling: name (value): #text ( t3 ) nextSibling: name (value): #text ( xxx ) @@ -394,30 +395,30 @@ nextSibling: NULL nextSibling: NULL name (value): #text ( xxx ) - parent: name (value): div () + parent: name (value): div ( t4 t3 xxx ) previousSibling: name (value): b () nextSibling: NULL Inserting fragment before t4 Error (2) on line 109: DOMNode::insertBefore(): Document Fragment is empty -name (value): div () +name (value): div ( t4 t3 xxx ) parent: NULL previousSibling: NULL nextSibling: NULL name (value): #text ( t4 ) - parent: name (value): div () + parent: name (value): div ( t4 t3 xxx ) previousSibling: NULL nextSibling: name (value): #text ( t3 ) name (value): #text ( t3 ) - parent: name (value): div () + parent: name (value): div ( t4 t3 xxx ) previousSibling: name (value): #text ( t4 ) nextSibling: name (value): b () name (value): b () - parent: name (value): div () + parent: name (value): div ( t4 t3 xxx ) previousSibling: name (value): #text ( t3 ) nextSibling: name (value): #text ( xxx ) @@ -427,58 +428,58 @@ nextSibling: NULL nextSibling: NULL name (value): #text ( xxx ) - parent: name (value): div () + parent: name (value): div ( t4 t3 xxx ) previousSibling: name (value): b () nextSibling: NULL p: -name (value): p () +name (value): p (X t2 xxx t1 t5 frob t6 ) parent: NULL previousSibling: NULL nextSibling: NULL - name (value): b () - parent: name (value): p () + name (value): b (X) + parent: name (value): p (X t2 xxx t1 t5 frob t6 ) previousSibling: NULL nextSibling: name (value): #text ( t2 ) name (value): #text (X) - parent: name (value): b () + parent: name (value): b (X) previousSibling: NULL nextSibling: NULL name (value): #text ( t2 ) - parent: name (value): p () - previousSibling: name (value): b () + parent: name (value): p (X t2 xxx t1 t5 frob t6 ) + previousSibling: name (value): b (X) nextSibling: name (value): #text ( xxx ) name (value): #text ( xxx ) - parent: name (value): p () + parent: name (value): p (X t2 xxx t1 t5 frob t6 ) previousSibling: name (value): #text ( t2 ) nextSibling: name (value): #text ( t1 ) name (value): #text ( t1 ) - parent: name (value): p () + parent: name (value): p (X t2 xxx t1 t5 frob t6 ) previousSibling: name (value): #text ( xxx ) nextSibling: name (value): #text ( t5 ) name (value): #text ( t5 ) - parent: name (value): p () + parent: name (value): p (X t2 xxx t1 t5 frob t6 ) previousSibling: name (value): #text ( t1 ) - nextSibling: name (value): i () + nextSibling: name (value): i ( frob ) - name (value): i () - parent: name (value): p () + name (value): i ( frob ) + parent: name (value): p (X t2 xxx t1 t5 frob t6 ) previousSibling: name (value): #text ( t5 ) nextSibling: name (value): #text ( t6 ) name (value): #text ( frob ) - parent: name (value): i () + parent: name (value): i ( frob ) previousSibling: NULL nextSibling: NULL name (value): #text ( t6 ) - parent: name (value): p () - previousSibling: name (value): i () + parent: name (value): p (X t2 xxx t1 t5 frob t6 ) + previousSibling: name (value): i ( frob ) nextSibling: NULL diff --git a/ext/dom/tests/bug42082.phpt b/ext/dom/tests/bug42082.phpt index 98fa638..b5fc893 100644 --- a/ext/dom/tests/bug42082.phpt +++ b/ext/dom/tests/bug42082.phpt @@ -22,9 +22,9 @@ DOMNodeList int(0) bool(true) bool(true) -NULL +string(0) "" +bool(true) bool(true) -bool(false) bool(false) bool(false) ===DONE=== diff --git a/ext/dom/tests/bug69846.phpt b/ext/dom/tests/bug69846.phpt index a667a89..08e35cd 100644 --- a/ext/dom/tests/bug69846.phpt +++ b/ext/dom/tests/bug69846.phpt @@ -81,7 +81,11 @@ object(DOMElement)#%d (17) { ["nodeName"]=> string(5) "form1" ["nodeValue"]=> - NULL + string(39) " + Value A + Value B + Value C + " ["nodeType"]=> int(1) ["parentNode"]=> diff --git a/ext/dom/tests/bug70029.phpt b/ext/dom/tests/bug70029.phpt deleted file mode 100644 index 55244c6..0000000 --- a/ext/dom/tests/bug70029.phpt +++ /dev/null @@ -1,12 +0,0 @@ ---TEST-- -Bug #70029 (nodeValue of DOMElement list content of children nodes) ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php -$doc = new DOMDocument(); -$doc->loadXml('<tag><childtag>myString</childtag></tag>'); -var_dump($doc->documentElement->nodeValue); -?> ---EXPECT-- -NULL diff --git a/ext/dom/tests/dom001.phpt b/ext/dom/tests/dom001.phpt index 13e8fbf..a0c78fb 100644 --- a/ext/dom/tests/dom001.phpt +++ b/ext/dom/tests/dom001.phpt @@ -108,7 +108,7 @@ Num Children: 4 Node Name: title Node Type: 1 Num Children: 1 -Node Content: +Node Content: Title Node Name: #text Node Type: 3 @@ -142,7 +142,7 @@ Num Children: 4 Node Name: title Node Type: 1 Num Children: 1 -Node Content: +Node Content: Title Node Name: #text Node Type: 3 @@ -186,7 +186,7 @@ Node Content: en Node Name: Silly Node Type: 1 Num Children: 1 -Node Content: +Node Content: Symphony <?xml version="1.0" standalone="yes"?> <!DOCTYPE chapter SYSTEM "/share/sgml/Norman_Walsh/db3xml10/db3xml10.dtd" [ @@ -214,24 +214,24 @@ Node Content: Node Name: Silly Node Type: 1 Num Children: 1 -Node Content: +Node Content: Symphony Using elem Node Name: Silly Node Type: 1 Num Children: 1 -Node Content: +Node Content: Symphony --------- Unlink Node Node Name: Silly Node Type: 1 Num Children: 1 -Node Content: +Node Content: Symphony Node Name: title Node Type: 1 Num Children: 1 -Node Content: +Node Content: Title Node Name: #text Node Type: 3