Skip to content

Commit 9b916b1

Browse files
committed
Merge branch 'PHP-7.1'
2 parents 52a22fa + 908ad3c commit 9b916b1

File tree

4 files changed

+32
-4
lines changed

4 files changed

+32
-4
lines changed

ext/dom/node.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,8 @@ int dom_node_next_sibling_read(dom_object *obj, zval *retval)
549549

550550
nextsib = nodep->next;
551551
if (!nextsib) {
552-
return FAILURE;
552+
ZVAL_NULL(retval);
553+
return SUCCESS;
553554
}
554555

555556
php_dom_create_object(nextsib, retval, obj);

ext/dom/tests/bug69846.phpt

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ foreach ($dataNodes AS $node) {
3131
===DONE===
3232
--EXPECTF--
3333
int(3)
34-
object(DOMText)#%d (18) {
34+
object(DOMText)#%d (19) {
3535
["wholeText"]=>
3636
string(3) "
3737
"
@@ -57,6 +57,8 @@ object(DOMText)#%d (18) {
5757
NULL
5858
["previousSibling"]=>
5959
NULL
60+
["nextSibling"]=>
61+
NULL
6062
["attributes"]=>
6163
NULL
6264
["ownerDocument"]=>
@@ -73,7 +75,7 @@ object(DOMText)#%d (18) {
7375
string(3) "
7476
"
7577
}
76-
object(DOMElement)#%d (17) {
78+
object(DOMElement)#%d (18) {
7779
["tagName"]=>
7880
string(5) "form1"
7981
["schemaTypeInfo"]=>
@@ -98,6 +100,8 @@ object(DOMElement)#%d (17) {
98100
string(22) "(object value omitted)"
99101
["previousSibling"]=>
100102
NULL
103+
["nextSibling"]=>
104+
NULL
101105
["attributes"]=>
102106
string(22) "(object value omitted)"
103107
["ownerDocument"]=>
@@ -117,7 +121,7 @@ object(DOMElement)#%d (17) {
117121
Value C
118122
"
119123
}
120-
object(DOMText)#%d (18) {
124+
object(DOMText)#%d (19) {
121125
["wholeText"]=>
122126
string(1) "
123127
"
@@ -143,6 +147,8 @@ object(DOMText)#%d (18) {
143147
NULL
144148
["previousSibling"]=>
145149
NULL
150+
["nextSibling"]=>
151+
NULL
146152
["attributes"]=>
147153
NULL
148154
["ownerDocument"]=>

ext/dom/tests/bug73907.phpt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
--TEST--
2+
Bug #73907 nextSibling property not included in var_dump of DOMNode
3+
--SKIPIF--
4+
<?php require_once('skipif.inc'); ?>
5+
--FILE--
6+
<?php
7+
$xmlString = '<?xml version="1.0" encoding="utf-8" ?>
8+
<root>
9+
</root>';
10+
11+
$doc = new DOMDocument();
12+
$doc->loadXML($xmlString);
13+
$attr = $doc->documentElement;
14+
15+
var_dump($attr);
16+
--EXPECTF--
17+
object(DOMElement)#%d (%d) {%A
18+
["nextSibling"]=>
19+
NULL
20+
%A}

ext/dom/tests/domobject_debug_handler.phpt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ DOMDocument Object
4747
[firstChild] => (object value omitted)
4848
[lastChild] => (object value omitted)
4949
[previousSibling] =>
50+
[nextSibling] =>
5051
[attributes] =>
5152
[ownerDocument] =>
5253
[namespaceURI] =>

0 commit comments

Comments
 (0)