|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #80891 DOMDocument::registerNodeClass contains wrong information
Submitted: 2021-03-19 20:30 UTC Modified: 2021-07-07 17:17 UTC
From: andrey at email dot dp dot ua Assigned:
Status: Verified Package: DOM XML related
PHP Version: Irrelevant OS: Debian Linux
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2021-03-19 20:30 UTC] andrey at email dot dp dot ua
DOMDocument::registerNodeClass manual contains the following chapter:

"Example #3 Retrieving owner document

When instantiating a custom DOMDocument the ownerDocument property will refer to the instantiated class, meaning there is no need (and in fact not possible) to use DOMDocument::registerNodeClass() with DOMDocument"

In fact this information is wrong. DOMDocument::registerNodeClass() with DOMDocument is required to set to work with extended DOMDocument classes

Otherwise extended DOMDocument class will be changed to unextended DOMDocument on context change

Please look at:
Bug #60323
Extended DOMDocument will change to unextended DOMDocument on context change


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2021-03-22 12:14 UTC]
-Type: Bug +Type: Documentation Problem -Package: Documentation problem +Package: DOM XML related
 [2021-07-07 17:17 UTC]
-Status: Open +Status: Verified
 [2021-07-07 17:17 UTC]
Right; but example #4 (Custom objects are transient) is still
correct, and needs to be considered by the developer.
 [2022-12-23 06:10 UTC] kimia dot ssalamo9881 at gmail dot com
Thanks for that. 

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Feb 26 21:01:31 2024 UTC