summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS2
-rw-r--r--ext/dom/node.c3
-rw-r--r--ext/dom/tests/bug69846.phpt12
-rw-r--r--ext/dom/tests/bug73907.phpt20
-rw-r--r--ext/dom/tests/domobject_debug_handler.phpt1
5 files changed, 34 insertions, 4 deletions
diff --git a/NEWS b/NEWS
index 18e11b300b..2f74991471 100644
--- a/NEWS
+++ b/NEWS
@@ -10,6 +10,8 @@ PHP NEWS
- Dom:
. Fixed bug #61858 (DOMAttr debug info generates E_WARNING). (Arnout Boks)
+ . Fixed bug #73907 (nextSibling property not included in var_dump of DOMNode).
+ (Arnout Boks)
- GD:
. Fixed bug #73893 (A hidden danger of death cycle in a function of gd). (cmb)
diff --git a/ext/dom/node.c b/ext/dom/node.c
index 69477d4302..c3a7819251 100644
--- a/ext/dom/node.c
+++ b/ext/dom/node.c
@@ -549,7 +549,8 @@ int dom_node_next_sibling_read(dom_object *obj, zval *retval)
nextsib = nodep->next;
if (!nextsib) {
- return FAILURE;
+ ZVAL_NULL(retval);
+ return SUCCESS;
}
php_dom_create_object(nextsib, retval, obj);
diff --git a/ext/dom/tests/bug69846.phpt b/ext/dom/tests/bug69846.phpt
index 08e35cdcf6..2e8e05aa2c 100644
--- a/ext/dom/tests/bug69846.phpt
+++ b/ext/dom/tests/bug69846.phpt
@@ -31,7 +31,7 @@ foreach ($dataNodes AS $node) {
===DONE===
--EXPECTF--
int(3)
-object(DOMText)#%d (18) {
+object(DOMText)#%d (19) {
["wholeText"]=>
string(3) "
"
@@ -57,6 +57,8 @@ object(DOMText)#%d (18) {
NULL
["previousSibling"]=>
NULL
+ ["nextSibling"]=>
+ NULL
["attributes"]=>
NULL
["ownerDocument"]=>
@@ -73,7 +75,7 @@ object(DOMText)#%d (18) {
string(3) "
"
}
-object(DOMElement)#%d (17) {
+object(DOMElement)#%d (18) {
["tagName"]=>
string(5) "form1"
["schemaTypeInfo"]=>
@@ -98,6 +100,8 @@ object(DOMElement)#%d (17) {
string(22) "(object value omitted)"
["previousSibling"]=>
NULL
+ ["nextSibling"]=>
+ NULL
["attributes"]=>
string(22) "(object value omitted)"
["ownerDocument"]=>
@@ -117,7 +121,7 @@ object(DOMElement)#%d (17) {
Value C
"
}
-object(DOMText)#%d (18) {
+object(DOMText)#%d (19) {
["wholeText"]=>
string(1) "
"
@@ -143,6 +147,8 @@ object(DOMText)#%d (18) {
NULL
["previousSibling"]=>
NULL
+ ["nextSibling"]=>
+ NULL
["attributes"]=>
NULL
["ownerDocument"]=>
diff --git a/ext/dom/tests/bug73907.phpt b/ext/dom/tests/bug73907.phpt
new file mode 100644
index 0000000000..346d8135bb
--- /dev/null
+++ b/ext/dom/tests/bug73907.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Bug #73907 nextSibling property not included in var_dump of DOMNode
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+$xmlString = '<?xml version="1.0" encoding="utf-8" ?>
+<root>
+</root>';
+
+$doc = new DOMDocument();
+$doc->loadXML($xmlString);
+$attr = $doc->documentElement;
+
+var_dump($attr);
+--EXPECTF--
+object(DOMElement)#%d (%d) {%A
+ ["nextSibling"]=>
+ NULL
+%A} \ No newline at end of file
diff --git a/ext/dom/tests/domobject_debug_handler.phpt b/ext/dom/tests/domobject_debug_handler.phpt
index 3c9f133548..57d4a66ebb 100644
--- a/ext/dom/tests/domobject_debug_handler.phpt
+++ b/ext/dom/tests/domobject_debug_handler.phpt
@@ -47,6 +47,7 @@ DOMDocument Object
[firstChild] => (object value omitted)
[lastChild] => (object value omitted)
[previousSibling] =>
+ [nextSibling] =>
[attributes] =>
[ownerDocument] =>
[namespaceURI] =>