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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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: Mon Oct 07 10:01:28 2024 UTC