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 Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
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

Pull Requests

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.
 [2022-12-23 06:10 UTC] kimia dot ssalamo9881 at gmail dot com
Thanks for that. 

(https://www.pmppayslip.net/)github.com
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 15:01:30 2024 UTC