php.net |  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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: andrey at email dot dp dot ua
New email:
PHP Version: OS:

 

 [2021-03-19 20:30 UTC] andrey at email dot dp dot ua
Description:
------------
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


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-03-22 12:14 UTC] cmb@php.net
-Type: Bug +Type: Documentation Problem -Package: Documentation problem +Package: DOM XML related
 [2021-07-07 17:17 UTC] cmb@php.net
-Status: Open +Status: Verified
 [2021-07-07 17:17 UTC] cmb@php.net
Right; but example #4 (Custom objects are transient) is still
correct, and needs to be considered by the developer.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Jul 31 18:01:24 2021 UTC