|  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-03-22 12:14 UTC
From: andrey at email dot dp dot ua Assigned:
Status: Open Package: DOM XML related
PHP Version: Irrelevant OS: Debian Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
49 - 1 = ?
Subscribe to this entry?

 [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
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Mon Jun 14 16:01:24 2021 UTC