com php-src: Fixed #73907 (nextSibling property not included in var_dump of DOMNode): NEWS ext/dom/node.c ext /dom/tests/bug69846.phpt
ext/dom/tests/bug73 907.phpt ext/dom/tests/domobject_debug_handler. phpt

From: Date: Tue, 10 Jan 2017 22:29:02 +0000
Subject: com php-src: Fixed #73907 (nextSibling property not included in var_dump of DOMNode): NEWS ext/dom/node.c ext /dom/tests/bug69846.phpt
ext/dom/tests/bug73 907.phpt ext/dom/tests/domobject_debug_handler. phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-96679@lists.php.net to get a copy of this message
Commit: 13edec75a32f8de674a9e0d5b295f9b872212343 Author: Arnout Boks <arnoutboks@gmail.com> Tue, 10 Jan 2017 20:48:45 +0100 Committer: Nikita Popov <nikic@php.net> Tue, 10 Jan 2017 23:29:02 +0100 Parents: 07340553a562db2387c9995dce0c84dd9afba97e Branches: PHP-7.0 PHP-7.1 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=13edec75a32f8de674a9e0d5b295f9b872212343 Log: Fixed #73907 (nextSibling property not included in var_dump of DOMNode) Bugs: https://bugs.php.net/73907 Changed paths: M NEWS M ext/dom/node.c M ext/dom/tests/bug69846.phpt A ext/dom/tests/bug73907.phpt M ext/dom/tests/domobject_debug_handler.phpt Diff: diff --git a/NEWS b/NEWS index a066036..d9be284 100644 --- a/NEWS +++ b/NEWS @@ -8,6 +8,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 9130294..82879da 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 08e35cd..2e8e05a 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 0000000..346d813 --- /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 3c9f133..57d4a66 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] =>

« previous php.cvs (#96679) next »