Doc #61797 [Opn]: DOMNode::appendChild doesn't increment refcount
| From: | krakjoe@php.net | Date: | Mon, 02 Dec 2013 19:57:19 +0000 |
| Subject: | Doc #61797 [Opn]: DOMNode::appendChild doesn't increment refcount | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-10669@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=61797&edit=1
ID: 61797
Updated by: krakjoe@php.net
Reported by: kuba dot brecka at gmail dot com
Summary: DOMNode::appendChild doesn't increment refcount
Status: Open
Type: Documentation Problem
Package: DOM XML related
Operating System: Windows, Linux
PHP Version: 5.4.0
Block user comment: N
Private report: N
New Comment:
It is obvious from tests that this behaviour is expected, that doesn't make it any more correct
... it might create compatibility issues if fixed ... I don't know ... patch updated to fix the
tests
Previous Comments:
------------------------------------------------------------------------
[2013-12-02 19:55:57] krakjoe@php.net
The following patch has been added/updated:
Patch Name: dom_node_append_child.patch
Revision: 1386014157
URL: https://bugs.php.net/patch-display.php?bug=61797&patch=dom_node_append_child.patch&revision=1386014157
------------------------------------------------------------------------
[2013-12-02 19:44:10] krakjoe@php.net
That is clearly wrong ... patch attached ... review please, no need to wait any longer ...
------------------------------------------------------------------------
[2013-12-02 19:43:25] krakjoe@php.net
The following patch has been added/updated:
Patch Name: dom_node_append_child.patch
Revision: 1386013405
URL: https://bugs.php.net/patch-display.php?bug=61797&patch=dom_node_append_child.patch&revision=1386013405
------------------------------------------------------------------------
[2012-04-26 13:46:48] kuba dot brecka at gmail dot com
Well, registerNodeClass solves it. But I still believe that without it, the
behaviour should not depend on the refcount of the object you are trying to use in
DOM. It should at least emit a warning or an exception, that you are using an
object, which has not beed registered.
Anyway, the need to use registerNodeClass should be mentioned in the docs, at
least in appendChild.
------------------------------------------------------------------------
[2012-04-26 13:27:54] maarten@php.net
Shouldn't you just use registerNodeClass() ?
See http://3v4l.org/E88Nk for a modified script
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=61797
--
Edit this bug report at https://bugs.php.net/bug.php?id=61797&edit=1